All Questions

1123
votes
35answers
390512 views

Passing Data between View Controllers

I'm new to iOS and, Objective-C and the whole MVC paradigm and I'm stuck with the following: I have a view that acts as a data entry form and I want to give the user the option to select multiple pro...
41
votes
2answers
27054 views

How to add a subview that has its own UIViewController in Objective-C?

I am struggling with subviews that have their own UIViewControllers. I have a UIViewController with a view (light pink) and two buttons on a toolbar. I want blue view to display when the first butto...
204
votes
11answers
168291 views

Looking to understand the iOS UIViewController lifecycle

Could you explain me the correct manner to manage the UIViewController lifecycle? In particular, I would like to know how to use Initialize, ViewDidLoad, ViewWillAppear, ViewDidAppear, ViewWillDisapp...
206
votes
16answers
119195 views

Programmatically set the initial view controller using Storyboards

How do I programmatically set the InitialViewController for a Storyboard? I want to open my storyboard to a different view depending on some condition which may vary from launch to launch.
163
votes
20answers
121546 views

Get to UIViewController from UIView?

Is there a built-in way to get from a UIView to its UIViewController? I know you can get from UIViewController to its UIView via [self view] but I was wondering if there is a reverse reference?
204
votes
35answers
147796 views

iPhone -- How to find topmost view controller

I've run into a couple of cases now where it would be convenient to be able to find the "topmost" view controller (the one responsible for the current view), but haven't found a way to do it. Basical...
443
votes
15answers
175801 views

How to tell if UIViewController's view is visible

I have a tabbar application, with many views. Is there a way to know if a particular UIViewController is currently visible from within the UIViewController? (looking for a property)
217
votes
5answers
65585 views

Explaining difference between automaticallyAdjustsScrollViewInsets, extendedLayoutIncludesOpaqueBars, edgesForExtendedLayout in iOS7

I have been reading a lot about iOS7 UI transition. I am not able to get what these three properties automaticallyAdjustsScrollViewInsets, extendedLayoutIncludesOpaqueBars, edgesForExtendedLayout?? ...
208
votes
9answers
204684 views

Instantiate and Present a viewController in Swift

Issue I started taking a look of the new Swift on Xcode 6, and I tried some demo projects and tutorials. Now I am stuck at: Instantiating and then presenting a viewController from a specific storybo...
80
votes
4answers
33626 views

dismissModalViewController AND pass data back

I have two view controllers, firstViewController and secondViewController. I am using this code to switch to my secondViewController (I am also passing a string to it): secondViewController *second =...

Previous Next