modalviewcontroller

Dismiss two modal view controllers

僤鯓⒐⒋嵵緔 提交于 2019-11-29 09:51:53
I have a navigation controller which present one modal viewController. From inside this modal viewController I present another modal viewController. All I want is to get back from the last modal viewController to the navigationController (the root viewController).Something similar with popToRootViewController, but adapted for modalViewControllers; NavigationController -> present Modal ViewController A -> present Modal ViewController B From modal ViewCOntroller B I want to return to navigationCOntroller. Is this possible? Appreciate, Alex. In iOS 5 you need to do [self.presentingViewController

iOS8 - prevent rotation on presenting viewController

帅比萌擦擦* 提交于 2019-11-29 07:46:07
问题 We have a MainViewController with a tableView, and it presents a new modalViewController. The MainViewController is restricted to portrait only, and the modalViewController can rotate. The problem is in iOS8, that when the modalViewController rotates, the callback method of rotation in iOS8 in MainViewcontroller is called - - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator Thus, the UITableView is getting its data

How to dismiss a modal VC with fade out animation?

吃可爱长大的小学妹 提交于 2019-11-29 02:57:15
问题 I am using the following code in my presenting VC to fade in the child modal VC, and this works fine: self.infoViewController.view.alpha = 0.0; [self.navigationController presentModalViewController:self.infoViewController animated:NO]; [UIView animateWithDuration:0.5 animations:^{self.infoViewController.view.alpha = 1.0;}]; However I can't get it to fade out, I have tried a few things, this is the latest I tried that doesn't work: - (IBAction)dismissAction:(id)sender { if ([[self

Best Method to Show a Popup Transparent Window on iPhone?

我只是一个虾纸丫 提交于 2019-11-29 02:36:09
I'm building an iOS 6 iPhone app in Xcode 4.6 and am wondering about the best way to achieve the following type of popup window: Specifically, the iPhone screenshot on the right, where, if a user taps on a face or UIView in the main window, a partially transparent popover appears with more detailed information -- such as a portrait photo and textual data -- but the original view (a photo collection here) remains visible, and the timers/counters continue ticking down in that view. I thought this would be a possible solution iPhone Modal View Smaller that the screen but it doesn't work for me.

iOS - Semi-transparent modal view controller

ぐ巨炮叔叔 提交于 2019-11-29 00:41:42
问题 I want to present a view controller with a slightly transparent background modally over the current view, such that the first view is slightly visible under the modal view. I set the alpha value of the modal view controller and set the modalPresentationStyle to UIModalPresentationCurrentContext , as suggested in another post. The result is that the view background is transparent when animating up, but when view controller is in place it changes to opaque black. It goes back to being

Delay in presenting a modal view controller

丶灬走出姿态 提交于 2019-11-29 00:22:44
问题 I have a tab bar based app. There are navigation controllers in all 5 tabs with instances of custom view controller setup properly as root view controllers. This loads just fine. A couple of these view controllers contain table views. I want to show a modal view controller to the user when they select a row in the table view. The (relevant part of) didSelectRowAtIndexPath delegate method looks as follows: SampleSelectorViewController *sampleVC = [[SampleSelectorViewController alloc] init];

How to create a UIViewController layout in storyboard and then use it in code?

一笑奈何 提交于 2019-11-28 23:37:00
I have a Storyboard in my iOS 5 application. In there I have created a number of screens and it works perfectly. However there's one view controller that I create in code, not as a result of UI action but at the end of processing data. I would like to show this view controller then, as a modalViewController, but also have it designed in the storyboard editor. Is it possible? Using the nibs I did it like this: ResultsController *rc = [[ResultsController alloc] initWithNibName:@"ResultsController" bundle:nil]; [self.navigationController presentModalViewController:rc animated:YES]; [rc release];

Show modal view controller with custom frame in iPad

夙愿已清 提交于 2019-11-28 21:43:48
问题 I want to show a modal UIViewController with a custom frame in iPad, centered on top of its parent view controller. I tried using a form sheet but as far I know the frame and shadow effect can't be changed. vc.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:cv animated:YES]; I also tried using a popover but as far as I know either I can't center it or I can't hide the arrow. Is there another way to show modal view controllers? Is it possible to solve

How to HIDE the iPad keyboard from a MODAL view controller?

僤鯓⒐⒋嵵緔 提交于 2019-11-28 21:15:58
I'm trying to hide the iPad keyboard from a modal view controller but it doesn't work. I have tried resignFirstResponder but that doesn't have any affect if we are in a modal view controller. I tried resignFirstResponder in a non-modal UINavigationController with the very same UIViewController and the keyboard hides correctly. Does anyone know how solve this problem? Thanks. [Update] it looks like there's something wrong with my code because the resignFirstResponder does work (I made a simple test case instead of using my code). But I still don't know what the problem is. Apparently, there is

Modal view controller won't dismiss itself

元气小坏坏 提交于 2019-11-28 20:54:29
问题 What I'm doing: In my app, I'm presenting a modal view controller (containing app settings) using the following code: optionsViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl; [self presentModalViewController:optionsViewController animated:YES]; This transition just curls up the bottom part of the view to expose a few settings. (See the 'Maps' app for an example.) When you tap on the top half of the page, where the original view is still there but grayed out, the modal