access view inside a storyboard
How does one access, in code, a view they dragged from the Object Browser into another view in their storyboard?
For example, I created a UIView which I assigned to a ViewController class. Then I dragged a Map View into that view. Now I need to start manipulating that Map View in code. How do I access it? I’ve tried things like self.view.subview but haven’t gotten anywhere from there.
Solutions Collect From Internet About “access view inside a storyboard”
You should use outlets, first select your storyboard file, then go to
View->Assistant Editor->Show Assistant Editor
Next select the map view, press
control on your keyboard and drag to the right section of xcode that will show your .h file, the following will appear
Write mapView inside it and hit enter, this will create an outlet for you to use
Now you can use mapView to access your MKMapView
- FBSOpenApplicationErrorDomain Code=3
- Learning Objective C without a Mac
- Video processing with OpenCV in IOS Swift project
- NSCalendar to Display Weekday
- How to enable build timing in Xcode?
- Swift HTML Decoding Trouble
- how and where do I initialize an global NSMutableArray in Xcode 5
- How to set image in selected cell row in UITableView
- iOS 8 UITableView rotation bug
- How do I load and edit a bitmap file at the pixel level in Swift for iOS?
- What is the proper way to handle background tasks in iOS
- NavigationBar bar, tint, and title text color in iOS 8
- Bezier curve algorithm in objective-c needs a tweak
- Can we fire an event when ever there is Incoming and Outgoing call in iphone?
- cameranode rotate as iOS device moving