modalviewcontroller

Clear UIWebView content upon dismissal of modal view (iPhone OS 3.0)

与世无争的帅哥 提交于 2019-11-27 01:06:59
问题 I currently have a UIWebView that is displayed within a modal view. It is basically a detail view that provides a view of a page when the user clicks a link. When the view is dismissed and then brought up again (when the user clicks another link), the previously-loaded content is still visible and the new content loads "on top" of the last content. This makes sense because the instance of the UIWebView persists between sessions and is only released when the memory is needed. However, I would

How do I make a modal date picker that only covers half the screen?

别等时光非礼了梦想. 提交于 2019-11-27 00:46:54
问题 I want to have the same effect as the birthday date setter in the iPhone contacts app. How do I have a modal date picker come up only halfway on the screen. I want the date picker to be over a UITableView (like in the iphone contacts app). I would like the UITableView to scroll freely behind the date picker (like in the iphone contacts app). Thanks in advance. 回答1: By far, the best way to achieve a date-picker/uipicker keyboard-like is to use the input view property of a textfield: Build a

How to custom Modal View Controller presenting animation?

痴心易碎 提交于 2019-11-27 00:11:24
问题 Instead of setting uiviewcontroller's modalTransitionStyle , I want to add an CAAnimation(or some other thing). This code can perform an custom animation in navigationController CATransition* transition = [CATransition animation]; transition.duration = 0.4; transition.type = kCATransitionFade; transition.subtype = kCATransitionFromBottom; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; [self.navigationController pushViewController:adjustViewController

presentViewController and displaying navigation bar

时光总嘲笑我的痴心妄想 提交于 2019-11-27 00:01:31
问题 I have a view controller hierarchy and the top-most controller is displayed as a modal and would like to know how to display the navigation bar when using 'UIViewController:presentViewController:viewControllerToPresent:animated:completion' The docs for 'presentViewController:animated:completion:' note: 'On iPhone and iPod touch, the presented view is always full screen. On iPad, the presentation depends on the value in the modalPresentationStyle property.' For 'modalPresentationStyle', the

How can I detect the dismissal of a modal view controller in the parent view controller? [duplicate]

眉间皱痕 提交于 2019-11-26 23:57:53
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Call Function in Underlying ViewController as Modal View Controller is Dismissed I've tried almost everything. Here's what I've tried: -(void)viewWillAppear:(BOOL)animated { NSLog(@"Test"); } -(void)viewDidAppear:(BOOL)animated { NSLog(@"Test"); } -(void)viewDidLoad { NSLog(@"Test"); } Why are none of these working in my parent view controller when the modal view controller is dismissed? How can I get this to

iPad custom size of modal view controller

╄→гoц情女王★ 提交于 2019-11-26 23:49:18
问题 I have a couple of modal view controllers of certain size. I'm trying to avoid the use of custom views (creating full screen black translucent overlay over current view, add the modal view over that view, do the animations, etc) to present it because there is no modalPresentationStyle that fits the size of my controllers. Now I'm using UIModalPresentationPageSheet but my view is smaller in height and I have an ugly blank space Desired presentation _______________ | _______ | | | | | | | MyVC

trying to update a UILabel on a parent view controller when dismissing the modal view

你离开我真会死。 提交于 2019-11-26 21:57:48
问题 I am trying to update a UILabel in a parent View after someone makes a change in a modal view. So, after they click "save" ... the newly entered value would change what text is displayed on the parent view controller. But, I can't seem to get that UILabel to refresh the newly entered value. Any ideas on what I can try? I've tried a few things, but being the view is already loaded, nothing is getting "refreshed". Thanks! 回答1: There are many ways to do this. One way is to use

dismiss modalviewcontroller from another modalviewcontroller

*爱你&永不变心* 提交于 2019-11-26 21:25:59
问题 I am presenting a modalviewcontroller from another modalviewcontroller. When I dismiss the second modalviewcontroller both the first and second modalviewcontroller should get dismissed. I tried to access the first modalview like [self.view.superview dismissmodalviewcontroller]; but it is showing error. What is the right way to get a ref to the first modalViewController from the second one and invoke the dismiss method from it? 回答1: Its like this. A presents B. Here, A is parent of B (Here, A

Modal View Controller with keyboard on landscape iPad changes location when dismissed [duplicate]

守給你的承諾、 提交于 2019-11-26 21:25:07
问题 This question already has an answer here: Modal Dialog Does Not Dismiss Keyboard 6 answers I present a modal view controller on my on my iPad with UIModalPresentationFormSheet presentation style and UIModalTransitionStyleCoverVertical transition style. The Modal View Controller contains a UIWebView with some TextFields on it. When the user taps one of the text fields the keyboard comes up. I have noticed that in landscape mode after the keyboard is shown, if I try to dismiss the modal view

UIModalTransitionStylePartialCurl doesn't get back to previous state. (Not dismissing)

久未见 提交于 2019-11-26 21:07:19
I've got 2 view controllers, let's say A and B. In A, I'm calling B to be shown with transition style UIModalTransitionStylePartialCurl [b setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self presentModalViewController:b animated:YES]; It is working fine. However when I press the curled area in the program compiled with iOS 4.3. It does not dismiss at all. It doesn't get back to A view controller... What the most interesting is that this curl is active and giving response in the app compiled with iOS 5.0. How can I resolve this problem? Moreover, why doesn't it dismiss the B view