modalviewcontroller

ios: how to dismiss a modal view controller and then pop a pushed view controller

[亡魂溺海] 提交于 2019-12-03 12:17:12
I have a view controller B that is pushed onto the navigation stack by root view controller A and this view controller B needs to display an alternative view if its model is in a certain state so it is modally presenting another view controller C. When I dismiss view controller C I would also like to pop view controller B if that is also on the nav stack. I would like to do it in such a way that there is only 1 transition. Any ideas? In the scenario you posted, the presenting view controller for view controller C will actually be the navigation controller, so you can ask it to pop off B, and

iPhone: How to do a presentModalViewController animation from left to right

余生颓废 提交于 2019-12-03 09:20:38
问题 I am presenting a model view with animation. As a default it comes from bottom to top. How can I make the animation to go from left to right? I know I could use a navigation controller. But actually the presenting view does not need a navigation bar and also the modally presented view does not need a navigation bar. Still I want a transition from left to right. 回答1: There are only four UIModalTransitionStyle s: UIModalTransitionStyleCoverVertical UIModalTransitionStyleFlipHorizontal

present more than one modalview in appdelegate

不问归期 提交于 2019-12-03 07:32:31
I want to present a modalviewcontroller after every push-message the app recieves in "application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo" I present the viewcontroller like this: ReleaseViewController *viewController = [[ReleaseViewController alloc] init]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; [self.window.rootViewController presentModalViewController:navController animated:YES]; So when another push-message arrives and the old ModalViewController is still visibile, I want

REALLY strange app color behavior?

ⅰ亾dé卋堺 提交于 2019-12-03 05:53:30
On appDidFinishLaunchingWithOptions, I tint my entire app red with the following code. self.window.tintColor = [UIColor otfRedColor]; This works perfectly, and when my app loads, all the navigation bar items are red. A is my root view controller. I have 3 view controllers, a, b, and c. A pulls up a modal presentation view sheet of b which pulls up a full modal view of c. When C is pulled up, the bar button items on navigation bar are all tinted gray, this shouldn't be happening because I didn't alter any tint or color in any way after the app delegate tinted the window. I then use [self

Popover with ModalPresentationStyle is not centered in iOS 7 iPad

北慕城南 提交于 2019-12-03 04:20:40
问题 I have a problem with iOS 7 that seems to be a bug or I just don't do something right. I have modalViewController that appears as a popover on iPad with ModalPresentationStyle. And it is not standard size, custom sized. Here is the code: myViewController *myVC = [[myViewController alloc] init]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:myVC]; [nav setModalPresentationStyle:UIModalPresentationFormSheet]; [nav setModalTransitionStyle:

Handling In-Call Status Bar with Custom Modal Presentation

给你一囗甜甜゛ 提交于 2019-12-03 03:37:26
问题 The Problem I've noticed some strange behavior when presenting a UINavigationController (with a root view controller, already pushed, naturally) with UIViewControllerAnimatedTransitioning during a phone call. If the in-call status bar is enabled after the the navigation controller is presented, the navigation controller shifts its view down as expected. But when the call is ended, the controller does not shift its view back up, leaving a 20p gap under the status bar. If the in-call status bar

Objective C: How to present modal view controller from appdelegate?

不想你离开。 提交于 2019-12-03 03:29:18
I am in the appdelegate of my application. How can I add a modal view controller in the "didfinishlaunching" method? I tried the following but did not work SomeViewController *vc = [[SomeViewController alloc]init]; [self.tabController.navigationController presentModalViewController:vc animated:NO]; EDIT: I changed my implementation to the following self.tabController.selectedViewController = [self.tabController.viewControllers objectAtIndex:0]; SomeViewController *vc = [[SomeViewController alloc]init]; [self.tabController.selectedViewController presentModalViewController:vc animated:NO]; I

iPhone Modal View Smaller that the screen

一曲冷凌霜 提交于 2019-12-03 03:20:12
问题 I'm trying to do something that shouldn't be that complicated, but I can't figure it out. I have a UIViewController displaying a UITableView. I want to present a context menu when the user press on a row. I want this to be a semi-transparent view with labels and buttons. I could use an AlertView, but I want full control on the format of the labels and buttons and will like to use Interface Builder. So I created my small view 250x290, set the alpha to .75 and create a view controller with the

Workaround for custom UIViewController animations in landscape?

我们两清 提交于 2019-12-03 03:15:59
问题 I have a custom animated UIViewController transition, and it seems that there is a bug in iOS that screws up the layout in landscape orientation. In the main animation method, i'm given a mix of landscape and portrait views. (In portrait the views are all portrait, so no problem.) - (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionContext; { UIViewController* toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];

How to present a half modal view controller over the top with iOS 7 custom transitions

早过忘川 提交于 2019-12-03 01:15:53
问题 How would I go about presenting a "half view" controller over the top of main view controller? Requirements: - Present a second view controller that slides over the top of main view controller. - Second view controller should only show over half of the main view controller - Main view controller should remain visible behind second view controller (transparent background, not showing black underneath) - Second view controller should animate in with animation similar to modal vertical cover, or