All Questions

1100
votes
35answers
382919 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...
38
votes
2answers
26358 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...
198
votes
11answers
162247 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...
200
votes
15answers
116008 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.
198
votes
33answers
143851 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...
161
votes
20answers
119528 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?
436
votes
15answers
171026 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)
215
votes
5answers
63713 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?? ...
200
votes
9answers
195664 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
33468 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