ios - Go to new view on change of search bar swift -


i need go new table view on beginning editing of search bar in current view shown in picture below.

enter image description here

so far have created segue per this answer, , used following code in current controller search bar.

declarations:

lazy   var searchbar:uisearchbar = uisearchbar(frame: cgrectmake(0, 40, 140, 40)) 

in viewdidload:

searchbar.delegate = self; 

and following function (showsearchresults id of segue):

func searchbartextdidbeginediting(searchbar: uisearchbar){          self.performseguewithidentifier("showsearchresults", sender: self)     } 

what want happen new controller appear when click onthe search box, error:

2016-07-28 15:42:25.750 abcapp[7745:3279712] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'receiver (<abcapp.homepageviewcontroller: 0x7b08e910>) has no segue identifier 'showsearchresults'' *** first throw call stack:  -----  libc++abi.dylib: terminating uncaught exception of type nsexception 

any idea?


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -