modalviewcontroller

Best way to pass data from Child Modal VC to the Parent View Controller?

我只是一个虾纸丫 提交于 2019-12-02 23:49:14
What is the best way to pass data from a child modal view to the parent view controller? I have a Child Modal Login Screen on my iPad app that I want to pass back user information to the parent Split View Controller. I am thinking of using NSNotification, but I am not sure if this is the easiest/most efficient way to pass data back to the parent. Thanks! Alan Carl Veazey I would suggest, as iPatel did , to use delegation to solve your problem. The relationship between the parent view controller and the login view controller makes this pattern appropriate. When one object creates another in

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

孤街醉人 提交于 2019-12-02 23:44:21
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. There are only four UIModalTransitionStyle s: UIModalTransitionStyleCoverVertical UIModalTransitionStyleFlipHorizontal UIModalTransitionStyleCrossDissolve UIModalTransitionStylePartialCurl Like you said, a nav controller will push that

iPhone Modal View Smaller that the screen

梦想的初衷 提交于 2019-12-02 16:52:21
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 outlets to handle the different user events. Now I want to present it. If I use

Handling In-Call Status Bar with Custom Modal Presentation

守給你的承諾、 提交于 2019-12-02 15:47:56
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 is enabled before presenting the controller, the controller does not account for the status bar at all

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

假如想象 提交于 2019-12-02 14:32:45
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 iOS 7 custom transition - User can still interact with buttons on main view controller when second

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

好久不见. 提交于 2019-12-02 13:55:50
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 this: How would you make this effect when transitioning between one view and another? In other words, if

UIModalPresentationFullScreen not working in iPad landscape mode?

醉酒当歌 提交于 2019-12-02 12:29:24
I have added a ViewvController(B) as subview on ViewController(A). In ViewController A(SuperView) UIModelPresentationFullScreen working fine. But when am calling UIModelPresentationFull in ViewController B(SubView) it modelview showing in Portrait mode and that is also not fully viewed. How to solve this problem. Can any one help me please. I have tried 2 days. This is what I tried in both the superview and subview... picFBCapture *fbCapt = [[picFBCapture alloc] init]; //[self.navigationController pushViewController:fbCapt animated:YES]; //fbCapt.modalPresentationStyle =

ModalViewController loading on top of another Modal

元气小坏坏 提交于 2019-12-02 08:45:35
There may be a better way to do this, and please direct me if there is. I'm creating an UIImagePickerController with an overlayView in viewDidAppear for 'choose from library', 'take photo', 'flash' 'camera source', etc. // Set up the camera imagePicker = [[UIImagePickerController alloc] imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.delegate = self; imagePicker.cameraOverlayView = [self cameraOverlayView]; cameraOverlayView.backgroundColor = [UIColor clearColor]; imagePicker.showsCameraControls = NO; imagePicker.toolbarHidden = YES; imagePicker

Why tintColor doesn't work on navigation bar or toolbar on iOS7

旧街凉风 提交于 2019-12-02 07:35:49
On iOS7 of iPad, first, I setup an modal view controller, the size is 320 * 460, then, in this modal view controller, I presented another navigation view controller, after this, the tint color of navigation bar and tool bar of the presented navigation controller turns gray. I have tried to set tint color of navigation bar and tool bar, but it just doesn't work. Then I tried to present the navigation controller directly, then all tint color works both on navigation bar and tool bar. I have tried with the barTintColor property of navigation bar and tool bar, it works. I don't know what happens.

dismissing modalViewController of modalViewController

余生长醉 提交于 2019-12-02 07:27:03
问题 So I have a UITabBarController app and I want to display a login page, and so I did: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(userDidLogin:) name:UserDidLoginNotification object:nil]; LoginViewController* loginViewController = [[LoginViewController alloc] init]; self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:0]; [self.tabBarController.selectedViewController presentModalViewController:loginViewController