ios - How to share the ViewController class in TabBar with NavigationController? -


since newbie in iphone development, need advice.
app has 2 tabs which

  • first tab show tables of items has lat/long , url. when select item in tables, show location callout in mapview. in mapview, selecting callout can show website in webview.
  • second tab show items located on mapview @ 1 time. in mapview, selecting 1 callout , show website in webview.

my storyboard layout is,

navigationcontroller -> tabbarcontoller                         firsttab) tableview ->(segue"showdetail")->(*1 leads mapview of secondtab)                          secondtab) mapview ->(segue"showweb")-> webview 


mapview , webview of each tab shares same class. on storyboard, segue tableviewcontroller of first tab leads mapviewcontroller of second tab.

first tab can show annotation on mapview, , show website on webview. second tab shows annotations on mapview when push callout of 1 annotation, exception throwed says

'could not find navigation controller segue 'showweb'. push segues can used when source controller managed instance of uinavigationcontroller.'

of course know can 2 different implementation of mapview , webview each tab, want collectively implemented consider maintenance.

i think navigationcontroller not function on second tab in storyboard layout.

please tell me how that. :)

your tab bar controller should first controller, , table view , map view controllers should each embedded in own navigation controller.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -