Stuck on Assignment 5 toggling between mapview and imageview

31 views
Skip to first unread message

Adam Fraser

unread,
Jun 12, 2012, 8:30:50 PM6/12/12
to iphone-appd...@googlegroups.com
I'm currently stuck on assignment 5, I'm trying to allow the user to choose whether to display the picture on screen or a mapview.

I have a UIBarButtonItem in my navigation controller that replaces the detail View (initially an imageView) with a mapView.  I can get the map view to show but can't when the user then selects an image from the tableview I can't manage to switch the detail view back..

How are you guys dealing with the MapView navigation? Are you using a segue to replace the detailViews?

Any help would be appreciated.

Thanks.

Sarah

unread,
Jun 12, 2012, 10:48:49 PM6/12/12
to iPhone Application Development Auditors
The screentshots in the assignment handout seem to suggest that they
want you to show the map view in the master and only ever show the
image view in the detail. But, I also did it your way because I
thought it would be more intuitive. I have a segue from the master VC
to the image VC, but I changed the Style to "Replace" and Destination
to "Detail Split", which let me control the detail from the master.
Hope this helps.

Adam Fraser

unread,
Jun 12, 2012, 11:43:02 PM6/12/12
to iphone-appd...@googlegroups.com
Ah yes I hadn't looked at those images. I can get the mapView to show when I segue to it, but I can't get an image to then reappear when I select one from the tableview.  I think it might have something to do with the splitview delegates getting messed up because I'm changing the detail view.

How do you handle going from the map view to the image?

Sarah

unread,
Jun 13, 2012, 12:42:11 AM6/13/12
to iPhone Application Development Auditors
I don't have a navigation controller in my detail and no segue from
map view to the image. Instead, I have a segue from the table view to
the image, but the trick is to set the destination of the segue to
"Detail Split". Basically, I don't have segues between the map and the
image, I let the table view (master) determine which one to show in
the detail.
Reply all
Reply to author
Forward
0 new messages