简体   繁体   中英

MKMapview in tabbed application in xcode 4.2

I am a beginner in iOS development and have just start using the lasted xcode 4.2. I am developing an application using the storyboard having a tabbed interface. The application will have four tabs among which one should incorporate a Mapview. After setting the four tabs and linking them all together, i added a mapview to my first tab but i cant edit the Mapview properties or even add annotations since when adding the Mapview, it does not come with any .h or .m file. Any help concerning this would be greatly helpful.

You need to create classes (.h/.m) for your UIViewController's and link the interface elements in the storyboard to the underlying classes. Then within your UIViewController implementations, you can link your interface MKMapView to your class properties, then you can manipulate the MKMapView instance any way you want programatically through your UIViewController implementing class.

See here for a tutorial on usage of the storyboard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM