modalviewcontroller

Login to main app

假如想象 提交于 2019-12-11 18:34:56
问题 I've already built the main app and the login. In the appDelegate.m didFinishLaunchingWithOptions , I have [self.window addSubview:rootController.view]; Which loads up the mainView. However, I would want it to load up my login first as on a successful login, it will load the rootController (main app) etc. When I put [self.validateViewController presentModalViewController:validateViewController animated:YES]; and run the app, all I get is a white screen. What am I doing wrong? -> The reason I

How do I hide the status bar in an iOS app without causing the UINavigationBar to jump?

放肆的年华 提交于 2019-12-11 16:48:25
问题 I have a view controller that needs to hide the status bar before presenting a modal and after that modal is dismissed. This is not as simple as overriding prefersStatusBarHidden and then setting modalPresentationCapturesStatusBarAppearance because that will also cause a jump given I am presenting over the current context (the modal is a pull down to dismiss). Consider the instagram story UX, as an example. When tapping on a story, you actually see the status bar disappear before the story

Modal View Controller displays blank first time, works properly subsequently

社会主义新天地 提交于 2019-12-11 16:38:28
问题 I have a modal view controller that I am trying to present a web view in it. Tthe first time it appears, it shows up as blank. When I close it out and click it again, however, it displays fine. I'm thinking it may be an issue with the loading of the webView, but I've tried displaying it only when the webView finishes loading, but it never gets called then. NSURL* newURL = [[NSURL alloc] initFileURLWithPath: fileString]; NSURLRequest *newURLRequest = [[NSURLRequest alloc] initWithURL: newURL];

UITableView inside a Navigation Controller does not scroll after dismissing presentViewController

大兔子大兔子 提交于 2019-12-11 16:24:37
问题 I am showing a Modal Presentation View in a Navigation Controller by calling [self.navigationController presentViewController:controllerA animated:YES completion:nil]; And I am dismissing the controllerA by calling [self.presentingViewController dismissViewControllerAnimated:YES completion:nil] After the dismiss is done the UITableView in in the previous navigationController does not scroll up and down where as it did before the presentViewController was called. Do I need to do something

Different Orientation for Different Views?

核能气质少年 提交于 2019-12-11 15:32:57
问题 I'm making an iOS application that has an interface in the portrait view. However, when displaying web content I want the view to display in a landscape format, because I want the website test to display larger initially without the user needing to zoom. Can I tell the program so present this view only in landscape? Thank you. 回答1: looks like you want to force the orientation to landscape mode only.. heres my solution in MyViewController.h add this code on top of MyViewController's @interface

Presenting modal viewcontroller over splitviewcontroller at app startup

荒凉一梦 提交于 2019-12-11 11:03:49
问题 Due to the need for UISplitViewController to be rootviewcontroller, I am trying instead to present a viewcontroller modally at app startup to act as a login/welcome screen for the user. Apparently the following code in my AppDelegate.m should do the trick with IOS 6: #import "AppDelegate.h" #import "WelcomeViewController.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for

iPhone - ModalViewController not raising to top of the screen

筅森魡賤 提交于 2019-12-11 05:26:29
问题 I have a UIImagePickerController that is shown [self presentModalViewController:self.picker animated:NO]; Then later on the code, I allow the user to display a preference panel : PreferencesController *nextWindow = [[[PreferencesController alloc] initWithNibName:@"Preferences" bundle:nil] autorelease]; UINavigationController* navController = [[[UINavigationController alloc] initWithRootViewController:nextWindow] autorelease]; [self presentModalViewController:navController animated:YES]; At

Present a UIViewController from an NSObject

我是研究僧i 提交于 2019-12-11 04:47:23
问题 Something happens in my datamodel, and I need to present a modal viewcontroller instantiated through the storyboard. How can I do this? I need to present a modal VC from an NSObject, and obviously presentViewController is a UIViewController method. What's the best way to do this? UIStoryboard *mainStoryboard = [(AppDelegate *) [[UIApplication sharedApplication] delegate] storyboard]; NewMessageListenPopupVC *popupVC = [mainStoryboard instantiateViewControllerWithIdentifier:@

Dismissing Modal View Controller causing layout problems

会有一股神秘感。 提交于 2019-12-11 01:54:51
问题 I have a UIScrollVIew in a Navigation controller, I present a Modal View controller from the Navigation controller, which works fine. When I dismiss the modal view controller (from the parent), all the content in my UIScroll view gets moved around and paging is broken. The contents of the scroll view are added programmatically, but the scrollView was created in IB. 回答1: Sounds like it has to do with autoresizing behavior as well as the autoresizing masks. In IB, turn off "Autoresize Subviews"

Not working Orientation Notifications in VIewController under modal, with iOS5

自古美人都是妖i 提交于 2019-12-11 01:08:20
问题 Excuse my English.. :) In my viewController (A) there is a orientation notifier like this: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { UIDeviceOrientation newOrientation = [[UIDevice currentDevice] orientation]; if (newOrientation == UIDeviceOrientationUnknown || newOrientation == UIDeviceOrientationFaceUp || newOrientation == UIDeviceOrientationFaceDown) { UIInterfaceOrientation mainOrientation = [[UIApplication sharedApplication]