modalviewcontroller

iOS: Apply view rotation to view controller under modal view

荒凉一梦 提交于 2019-12-07 06:34:53
问题 I have been following a solution on this question in order to display a view with a transparent background. The issue that I'm having is once the modal view controller has been displayed, the underlying view doesn't get rotated anymore. For example if A is my view controller, then B is my modal view. The issue is as follows. I currently have my device in portrait and have A displayed. I then present B modally. I then rotate my device and B rotates with it, however A stays as it was. Please

how to present modal UIViewController dialog from bottom in IOS like this (image attached)

独自空忆成欢 提交于 2019-12-06 16:09:08
问题 How would one present a UIViewController (from Storyboard say) that is modal, and slides up from the bottom of the presenting view controller. Requirements would be: slides up from bottom, with widths aligning with the width of the presenting view controller does NOT take up whole screen or whole parent presenting view controller (rather only is as high as required to show itself) can be shown within the context of a view controller which doesn't take the whole screen 回答1: I do not use

Presenting a modal view controller over only one half of a split view controller

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 14:37:50
问题 I'm adapting an existing iPhone app to run on the iPad. In the iPhone version, when the user tapped a toolbar button, I would present a modal view controller with a modalTransitionStyle of UIModalTransitionStyleFlipHorizontal , which made a really nice "card-flipping" animation. The iPad interface is based on a split view ( MGSplitViewController , actually). The toolbar button is on the detail pane, so when I present the modal view controller, it takes up the entire screen and the flip

How to resize a modalViewController with UIModalPresentationPageSheet

主宰稳场 提交于 2019-12-06 13:28:00
问题 I've a modal view controller that I show with UIModalPresentationPageSheet. The problem is that his default size is too large for my content: so I want to resize is frame to adjust in according with my content. Does anyone know a way/trick to do this ? Thanks 回答1: You can't resize a UIModalPresentationPageSheet because its size is not modifable. 回答2: Actually you can resize the view controller that gets presented with UIModalPresentationPageSheet. To do it you need to create a custom view

MVC violation in Ionic(angular) framework with $ionicModal

梦想与她 提交于 2019-12-06 11:42:49
When working with the $ionicModal in Ionic Framework, I noticed a lot of people instantiate the Modal inside the controller and pass the controller scope to the Modal. Like so, $ionicModal.fromTemplateUrl("views/call_options_view.html", function ($ionicModal) { $scope.menu = $ionicModal; }, { scope: $scope, animation: "slide-in-up" }); Doing this allows the modal to invoke methods in the controller scope. Is there some way we can give a separate controller to the Modal? Right now, using the controller scope, isn't there a MVC violation? The controller owns two views. Suppose I want the same

Present Modal View in iOS 6

北城余情 提交于 2019-12-06 10:44:29
问题 I want to display a modal view but I have two problems: There is no presentModalViewController in iOS 6 and I have to use presentViewController which is just display my second ViewController like a modal segue not a modal window without full screen option, My second problem is how can I show the modal window from UICollectionViewController. I tried to use presentViewController but it just works with ViewController not CollectionViewController. The best example of what I want to do is this

With UIPresentationFormSheet, why doesn't my view move above the keyboard when it is up?

蹲街弑〆低调 提交于 2019-12-06 09:30:14
Apple says: UIModalPresentationFormSheet The width and height of the presented view are smaller than those of the screen and the view is centered on the screen. If the device is in a landscape orientation and the keyboard is visible, the position of the view is adjusted upward so that the view remains visible. All uncovered areas are dimmed to prevent the user from interacting with them. But my view doesn't move up when the keyboard is visible. I basically want to present a textview modally above the keyboard so the user can enter text and then hit send (in a nav bar button on the presented

swift dismiss modal and push to new VC

戏子无情 提交于 2019-12-06 06:22:06
I have tableview... 1 table showing a new modal window and when I press the button I want to dismiss the modal window and push to VC. My code only hide the modal view but no push is made. @IBAction func registrationBtn(sender: AnyObject) { let openNewVC = self.storyboard?.instantiateViewControllerWithIdentifier("registrationVcID") as! RegistrationVC self.dismissViewControllerAnimated(false, completion: { () -> Void in self.navigationController?.pushViewController(openNewVC, animated: true) }) } You should create a protocol protocol View1Delegate: class { func dismissViewController(controller:

UINavigationBar refuses to show in Modal View Controller

北慕城南 提交于 2019-12-06 04:42:54
I am loading a Modal view controller using the following code in my RootViewController: [self.navigationController presentModalViewController:accountViewController animated:YES]; In the accountViewController xib file, I have set a navigation bar. My MainWindow.xib and RootViewController.xib also have the navigation bar setup correctly. Additionally, my app delegate has setup the navigation controller (I assume) correctly: UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; self.navigationController =

Presenting MFMessageComposeViewController broken in iOS 6

℡╲_俬逩灬. 提交于 2019-12-06 04:42:15
My app presents a MFMessageComposeViewController modally. It was working perfectly fine in iOS 5 (both on the simulator and on the device). After I upgraded my iPhone to 6, it simply doesn’t work anymore. The app freezes for like 10 seconds, then this message appears in the debugger "Remote compose controller timed out (YES)!" And the modal view does not show up. I searched extensively on stackoverflow and on the web, and couldn’t find any solution. As a final resort, I downloaded and ran the sample code of apple, "MessageComposer" and, alas, even in apple code it does not work on iOS 6. I`m