modalviewcontroller

How do I make an expand/contract transition between views on iOS?

ぃ、小莉子 提交于 2019-12-20 07:58:57
问题 I'm trying to make a transition animation in iOS where a view or view controller appears to expand to fill the whole screen, then contract back to its former position when done. I'm not sure what this type of transition is officially called, but you can see an example in the YouTube app for iPad. When you tap one of the search result thumbnails on the grid, it expands from the thumbnail, then contracts back into the thumbnail when you return to the search. I'm interested in two aspects of

Presenting a View Controller Modally Resets The Current View

血红的双手。 提交于 2019-12-20 07:32:34
问题 Question I am trying to present view controller modally (a UIImagePickerController to be precise) while animating some views before the presentation. It's important to note that the animations and the presentation of the view are not chained, and there can be a time-gap between the views animating and modally presenting the image picker. With all that said, while I present the view controller, it seems that all of the subviews of the current view I'm in (the view I'm presenting from - the

iOS AutoLayout issue with ScrollView

怎甘沉沦 提交于 2019-12-20 03:26:21
问题 Hello i have an auto layout issue with UIScrollView and ModalViewController . Here are my coding steps as sample code: 1) I have an UIViewController with an UIScrollView as subView UIViewController *viewController = [[UIViewController alloc] init]; UIScrollView *scrollView = [[UIScrollView alloc] init]; scrollView.translatesAutoresizingMaskIntoConstraints = NO; [viewController.view addSubview:scrollView]; UIView *superView = viewController.view; NSDictionary *viewsDict =

Two ModalViewController

£可爱£侵袭症+ 提交于 2019-12-19 09:49:51
问题 I have a navigationController from where I launch a ModalViewController. In this ModalViewController I will display the MailComposer which itself another ModalViewController. Now if the user hits the send button the MailComposerView should be dismissed as well the other ModalViewController. For that I call a delegate method in the mailComposerController. Now only the MailComposerView will be dismissed but no the the other ModalViewController and I get following error message attempt to

Call presentModalViewController from NSObject class

自作多情 提交于 2019-12-19 07:38:08
问题 In my subclass of NSObject I would like to call something like [[self navController] presentModalViewController:myView animated:YES]; But none of my tries were successful. How can I call a modal view if I'm not in a subclass of UIViewController ? Solution: #import "myProjectNameAppDelegate.h" // ... MyViewController *myView = [[MyViewController alloc] init]; myProjectNameAppDelegate *appDelegate = (myProjectNameAppDelegate *)[[UIApplication sharedApplication] delegate]; [[appDelegate

presentModalViewController fullscreenmode issue

蓝咒 提交于 2019-12-19 04:57:07
问题 I'm trying to present this modalViewController in my app and it needs to be fullscreen. This is how I call up the ModalViewController. myViewController = [[MyViewController alloc] init]; //self.myViewController.SomeView = [[UIView alloc] init]; //self.myViewController.SomeView.frame = self.ThisView.frame; //self.myViewController.backButtonEnabled = NO; //self.myViewController.dismissDelegate = self; //[self.myViewController doLoadShizzle]; //do this to load view and stuffs as well //all

How to use modal views in swift?

跟風遠走 提交于 2019-12-19 03:21:39
问题 When adding an account to Mail (in preferences), you get a modal view, like this: My question is, how do I replicate this programatically? In other words, how do I display a modal UIView over a presenting view? Here's what I have: import UIKit class ViewController: UIViewController { @IBAction func addCard(sender: AnyObject) { var addContact : secondViewController = secondViewController() self.modalTransitionStyle = UIModalTransitionStyle.FlipHorizontal self.modalPresentationStyle =

How to change UIStatusBarStyle in iOS 7 in modal views with navigation bar?

房东的猫 提交于 2019-12-18 13:08:37
问题 The iOS 7 Transition Guide give a good hint how to change the UIStatusBarStyle dynamically in a UIViewController using - (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleDefault; } together with [self setNeedsStatusBarAppearanceUpdate]; This works fine in a single view application. However, I'm now trying to change the UIStatusBarStyle in a modal view to UIStatusBarStyleLightContent . There is a MainViewController which segues to the ModalViewController , which itself is

Present a transparent modal UIViewController

眉间皱痕 提交于 2019-12-18 12:56:18
问题 I'm trying to make a custom alertView (for iOS7+) on my own but I struggle with the alertView presentation. I have a UIViewController with a black background (alpha set to 0.25f), and a alertView as subview. When I want to show the alertView, I present modally the viewController: -(void) show { UIWindow* window = [[UIApplication sharedApplication] keyWindow]; self.modalTransitionStyle = UIModalPresentationCustom; self.transitioningDelegate = self; [window.rootViewController

Correct way of showing consecutive modalViews

喜夏-厌秋 提交于 2019-12-18 10:30:44
问题 I have two views that need to be shown modally, one after the other. This doesn't work if we dismiss and show consecutively, like this: [rootController dismissModalViewControllerAnimated: YES]; [rootController presentModalViewController: psvc animated: YES]; The second modal view simply doesn't show up. I've seen a fix that was something like this: [rootController dismissModalViewControllerAnimated: YES]; [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; [self