Back to table view from detail page without reload, Swift -


my table view has detail button each cell. when click button, go detail page cell. in detail page, there "back" button. when click it, can go table view, table view reloaded. question how can go without reload table view. want go cell click detail button.

thanks, tony

tableviewcontroller

    override func viewdidload() {     super.viewdidload()      let thewidth = view.frame.size.width     let theheight = view.frame.size.height      resultstable.frame = cgrectmake(0, 0, thewidth, theheight)     // additional setup after loading view.      refresher = uirefreshcontrol()     refresher.tintcolor = uicolor.blackcolor()     refresher.addtarget(self, action: "refresh", forcontrolevents: uicontrolevents.valuechanged)     self.resultstable.addsubview(refresher) } 

detailviewcontroller

class productdetailviewcontroller: uiviewcontroller {  @iboutlet weak var labeltitle: uilabel! var labeltitletext = string()    override func viewdidload()   {     super.viewdidload()     labeltitle.text = labeltitletext   }     @ibaction func backbuttontapped(sender: anyobject) {      self.dismissviewcontrolleranimated(true, completion: nil)   }  } 


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -