modal-view

iPhone - Detect the end of the animation

℡╲_俬逩灬. 提交于 2019-12-20 01:55:32
问题 How can I detect the end of the animation of a modal view (when I do a dismiss)? (I'm talking about MFMailComposeViewController which is not created by myself...) Thanks 回答1: Your modal view controller has a -viewDidDisappear: method that is automatically invoked whenever the view is removed from the screen. You can override this method in your modal view controller to do whatever you like. Also, you may want to consider implementing the -viewDidAppear: method in the view controller whose

Modal view closes when selecting an image in WkWebView iOS

狂风中的少年 提交于 2019-12-18 04:50:30
问题 I'm currently building an app with a modal view popping up that contains a WkWebView. When I want to upload an image within this modal view and the Photo Selection appears, the modal view just dismisses back to the view controller that fired it up. How can I prevent that? import UIKit class PostWindow : UIViewController { @IBAction func close(sender: AnyObject) { dismissViewControllerAnimated(true, completion: nil) } override func viewDidLoad() { super.viewDidLoad() // do stuff here let

wait after presentModalViewController

柔情痞子 提交于 2019-12-12 17:42:02
问题 I need to wait (don't execute the code) after the presentModalViewController until the modal view it's dismissed, it's possible or it's a conceptual error ? -(NSDictionary *)authRequired { //This view write the settings when dismissed (plist) [self presentModalViewController:loginRegView animated:YES]; //Read from the setting file (plist) and send back (it's a delagate method) NSMutableDictionary *ret=[[NSMutableDictionary alloc] init]; [ret setObject:[app.settings get:@"user"] forKey:@"user"

iOS TableView Reload after dismissing modal

六月ゝ 毕业季﹏ 提交于 2019-12-10 11:56:59
问题 In my app, I am listing core data entries in a tableview. I want to allow the user to edit records using a detail view presented modally as a form view. I am observing peculiar behavior when editing records. The flow: User loads tableview with records. -working User selects a record for editing. -working User edits record in a view controller presented as a modal form view. -working User saves edits and dismisses form view. -working Tableview shows correct changes for the previously edited

Dismiss Modal View

て烟熏妆下的殇ゞ 提交于 2019-12-07 17:47:40
问题 If I'm not mistaken, modal views have to be dismissed from the parent view, not from the modal view itself. In my current project I have two modal views. In the first one, I pass data to the parent view. When the data is passed to the parent view, the dismiss is executed. Now, I have another modal view that doesn't pass data to the parent view, so I don't know how to dismiss other than doing one self dismissModalView Other than that, any other suggestion for a good practise on this topic?

disable elements on UIView behind modal UIView

狂风中的少年 提交于 2019-12-06 09:49:07
问题 i have a UIView that is smaller than the superview so i can represent this view as a modal view when a button is clicked. I have managed to do the following: * add a subview to the superview. * centered this modal view I am now trying to make the elements behind the UIView unclickable. And also add a grey shadow te the ourside of my modal view so that the user understands that the modal view is the view in focus. I would like to know how to achieve this. I do not wish to use the presentation

tabBarController unLoad itself after call modalView

自闭症网瘾萝莉.ら 提交于 2019-12-04 05:54:53
问题 I have tabBarController with 6 views. As default tabBarController load first view, I need to load view #6 at my application start, so in my tabBarController I add to viewWillAppear [self.tabBarController setSelectedIndex:6]; , ok. In my view #3 a have 2 modal views witch I create in storyboard. When I tap a button I load my modal view, and when a close it [self dismissModalViewControllerAnimated:YES] ; (I was in view #3) I see view #6, but I need to come back to view #3, so if I understand

tabBarController unLoad itself after call modalView

时间秒杀一切 提交于 2019-12-02 09:48:12
I have tabBarController with 6 views. As default tabBarController load first view, I need to load view #6 at my application start, so in my tabBarController I add to viewWillAppear [self.tabBarController setSelectedIndex:6]; , ok. In my view #3 a have 2 modal views witch I create in storyboard. When I tap a button I load my modal view, and when a close it [self dismissModalViewControllerAnimated:YES] ; (I was in view #3) I see view #6, but I need to come back to view #3, so if I understand right when I call my modalView it unload my tabBarController and when I close it load tabBarController

iPhone - Detect the end of the animation

旧时模样 提交于 2019-12-01 21:29:23
How can I detect the end of the animation of a modal view (when I do a dismiss)? (I'm talking about MFMailComposeViewController which is not created by myself...) Thanks Your modal view controller has a -viewDidDisappear: method that is automatically invoked whenever the view is removed from the screen. You can override this method in your modal view controller to do whatever you like. Also, you may want to consider implementing the -viewDidAppear: method in the view controller whose view gets revealed by your modal view disappearing. You can subclass MFMailComposeViewController and overload

Modal view closes when selecting an image in WkWebView iOS

泪湿孤枕 提交于 2019-11-29 07:03:34
I'm currently building an app with a modal view popping up that contains a WkWebView. When I want to upload an image within this modal view and the Photo Selection appears, the modal view just dismisses back to the view controller that fired it up. How can I prevent that? import UIKit class PostWindow : UIViewController { @IBAction func close(sender: AnyObject) { dismissViewControllerAnimated(true, completion: nil) } override func viewDidLoad() { super.viewDidLoad() // do stuff here let myWebView:UIWebView = UIWebView(frame: CGRectMake(0, 70, UIScreen.mainScreen().bounds.width, UIScreen