modalviewcontroller

UINavigationController barstyle property changes layout

戏子无情 提交于 2019-12-24 12:05:16
问题 I have a modal view controller which displays a navigation controller. The navigation controller in-turn has a regular UIViewController as its root view controller. The only UI element that the above-mentioned UIViewController has is a UISwitch. Now here's the problem: When I change the barStyle property of the navigation controller, the layout of the UISwitch inside the UIViewController changes. Here's what I am talking about: If I don't set the barStyle property, here's what I get: http:/

iOS 5 issues: Disappearing keyboard when pulling up a UITextView

别来无恙 提交于 2019-12-24 09:00:08
问题 I have a nice little app on the app store that does pretty well for itself. Life was great until iOS 5 came to town. Now, I have a number of issues with my app that I have no way of fixing because I have no clue what is going on, because I feel that they are iOS 5 issues, not mine. Was there an iOS 5 conversion manual I missed? Or did they just change everything for fun, and want us to figure out where all the easter eggs were? Here is an issue I am experiencing (that I have wasted so much

What exactly is the height of modalPresentationStyle - FormSheet on iPad?

不打扰是莪最后的温柔 提交于 2019-12-24 02:22:37
问题 What exactly is the height of modalPresentationStyle - FormSheet on iPad? I wrote a line of code to get the height of self.view like this: println("Height - modalPresentationStyle FormSheet: \(self.view.frame.size.height)") I got these two results after testing: Without Formsheet on ModalViewController , height at 1024.0 With Formsheet on modalPresentationStyle , height at 1024.0 which is wrong because the height is supposed to be less than 1024.0 Any idea what is wrong with it? I need to get

ios 6 Incorrect modal view size after rotation

五迷三道 提交于 2019-12-23 17:13:51
问题 We have an ipad application, that supports landsace right and left orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Overriden to allow any orientation. return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } We are showing view controllers as modal view by calling childController.modalPresentationStyle = UIModalPresentationPageSheet; childController

swift dismiss modal and push to new VC

邮差的信 提交于 2019-12-22 12:54:30
问题 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) })

dismiss a modalviewcontroller when the application enters background

ⅰ亾dé卋堺 提交于 2019-12-22 11:18:13
问题 i need to dismiss my uiimagepicker modal viewcontroller automatically when the application enters the background.i tried to put the code to dismissmodalviewcontroller code in viewdiddissappear method,but its not being called.so i made a reference to the viewcontroller in appdelegate and tried to put it in the applicationdidenterbackgroundmethod but still it is not working.can someone point out the right way to do this 回答1: Try to add an NSNotificationCenter observer for

Resize ModalViewController and position it at center in iOS 7

我们两清 提交于 2019-12-22 05:31:16
问题 I am trying to show a modalView on an iPad by reducing its width and height, but the problem is that it is not center-aligned. In iOS 6 it used to work fine, but in iOS 7 it is not center aligned. Below is my code: m_helpQA = [[HelpQAViewController alloc]init]; m_helpQA.modalPresentationStyle = UIModalPresentationFormSheet; [self presentViewController:m_helpQA animated:YES completion:NULL]; m_helpQA.view.superview.bounds = CGRectMake(0, 0, 350, 250);//Dimensions of ModalView. presently I am

Present Modal fullscreem SwiftUI

馋奶兔 提交于 2019-12-22 00:06:48
问题 how can i present a modal that will take up the fullscreen and can't be dismissed by swiping it down? Currently I am using .sheet on a view to present a modal that is dismissible. I haven't noticed any beta changes in Xcode that changes this behavior. Any help would be appreciated :) 回答1: SwiftUI 1.0 I'm not sure if this what you'd want to go with but it's possible to create your own modal screen by using the ZStack and a state variable to control the hiding/showing of it. Code struct

How to dismiss a view controller opened with presentModalViewController:

99封情书 提交于 2019-12-20 12:30:55
问题 I presented a view controller using presentModalViewController: , now how to close/dismiss it? 回答1: You have two choices, both involves using dismissModalViewController. The preferred way is to use delegation and tell the view controller who was responsible for presenting the view to dismiss it. The other way is to have the view who was presented to dismiss itself (which actually asks the parent to dismiss it.) 回答2: For iOS6 use this code [self dismissViewControllerAnimated:YES completion:Nil

ios5 - size of modal view controller with storyboard

和自甴很熟 提交于 2019-12-20 09:37:58
问题 is there any way to resize a View Controller that has been presented modally using a storyboard segue? how do I present another View Controller from this modal view controller with a flip transition? If I define it as Style=Modal, Presentation=Default, Transition=Flip Horizontal it just looks weird (background is white). Thx! 回答1: Yes. In interface builder select the view controller and in the attribute inspector set Size to freeform (from inferred). Then select the view and set its