uiviewcontroller

App Opening to Blank Black Screen

大兔子大兔子 提交于 2020-01-16 18:55:48
问题 I am making an app that embeds a navigationcontroller into a tabbarcontroller. Now when I open the app I am getting just a blank black screen. Here is my code PDCFirstViewController *viewController1 = [[PDCFirstViewController alloc] initWithNibName:@"PDCFirstViewController" bundle:nil]; PDCSecondViewController *viewController2 = [[PDCSecondViewController alloc] initWithNibName:@"PDCSecondViewController" bundle:nil]; ViewController *viewController3 = [[ViewController alloc] initWithNibName:@

Creating a custom UINavigationController in storyboard isn't instantiating the view

ε祈祈猫儿з 提交于 2020-01-16 02:38:19
问题 I have a UIViewController which was created in a storyboard and has been assigned a storyboard id. This UIViewController is instantiated in various places in code and therefor it didn't make sense to create segues from all the different locations. The view controller needs to be contained in a UINavigationController in order to function properly because it uses the various navigation bar items and can push additional view controllers. The view controller is instantiated from code as follows:

PresentViewController a non full screen UIViewController with UINavigationController in it

社会主义新天地 提交于 2020-01-16 00:49:09
问题 I am trying to figure out if there is a way to present a UIViewController which is not full screen. It should be of custom size & not what can be achieved using modalPresentationStyle. I wanted to create a view like the native Twitter/Facebook sharing sheet's size with UINavigationController so that I can push/pop more UIViewControllers. It should work for iPhone and iPad. 回答1: You can use View Controller Containment to do this. See "Implementing A Container View Controller" at http:/

iOS - Passing accumulating data down a long chain of UIViewControllers

喜夏-厌秋 提交于 2020-01-15 12:23:47
问题 I am writing an iOS app with several (maybe 8) survey-style modules where the user will answer a series of questions (on Family Life, Health, etc.). Some modules have as many as 12 questions. Each question has its own nib and its own UIViewController. The answers will be written to a database, ideally, at the end of the module. Each module corresponds with one record in one table. There will only ever be one user, hence, one record. I want to leave the Core Data stack in the app delegate. I

iOS - Passing accumulating data down a long chain of UIViewControllers

丶灬走出姿态 提交于 2020-01-15 12:23:25
问题 I am writing an iOS app with several (maybe 8) survey-style modules where the user will answer a series of questions (on Family Life, Health, etc.). Some modules have as many as 12 questions. Each question has its own nib and its own UIViewController. The answers will be written to a database, ideally, at the end of the module. Each module corresponds with one record in one table. There will only ever be one user, hence, one record. I want to leave the Core Data stack in the app delegate. I

Cocoa Touch UIViewController Properties and class design

人盡茶涼 提交于 2020-01-15 10:27:28
问题 I'm creating a custom ViewController. This VC needs to load some data that is known in the event that creates it and pushes it to the top of the NavigationController that it is going to be part of. My question is, how should I pass data from the view that handles the custom ViewController's creation into that custom ViewController. I've thought of four possible options, and I was hoping to get feedback on why each one is good or not for this functionality. 1) Expose public properties in the

Interact with presenting controller whilst a modal controller is displayed

橙三吉。 提交于 2020-01-15 01:46:06
问题 Is it possible to interact with a presenting view controller whilst a model view controller is being presented? ------------ | | | VC1 | | | | | | | | | |------------| | VC2 | | | ------------ In the illustration above VC1 is the presentingViewController and VC2 is the presentedViewController . The user experience I am trying to achieve is that the user can interact with VC1 and VC2. At the moment, touches are not passed through to VC1 when VC2 is presented. 回答1: I might be late to this but

Interact with presenting controller whilst a modal controller is displayed

六月ゝ 毕业季﹏ 提交于 2020-01-15 01:44:08
问题 Is it possible to interact with a presenting view controller whilst a model view controller is being presented? ------------ | | | VC1 | | | | | | | | | |------------| | VC2 | | | ------------ In the illustration above VC1 is the presentingViewController and VC2 is the presentedViewController . The user experience I am trying to achieve is that the user can interact with VC1 and VC2. At the moment, touches are not passed through to VC1 when VC2 is presented. 回答1: I might be late to this but

I need to refresh the content of a view as soon as I popViewController

最后都变了- 提交于 2020-01-14 22:44:51
问题 ViewA load some data from Coredata, then push to the next viewB . In viewB , there are some function, that will change the content of viewA (meaning viewB change the content of core data). However, when I pop the view back to viewA , my content stay the same as before. How can I fix this? 回答1: in viewA's -(void)viewWillAppear:(BOOL)animated delegate method you can refresh the control you need... i.e. if you want to reload table that in viewWillAppear method write [Table reloadData]; 回答2:

UIPageViewController delegate method not called

允我心安 提交于 2020-01-14 09:07:34
问题 In my application I have a RootViewController (UIPageViewController), a FirstController (UIViewController) and a SecondController (UIViewController). The two views inside the two UIViewControllers scroll over the RootViewController . In my RootViewController.h: @interface RootController : UIPageViewController <UIPageViewControllerDataSource, UIPageViewControllerDelegate> But when I scroll between different views delegate methods like: -(void) pageViewController:(UIPageViewController *