dismiss

Correct way of showing consecutive modalViews

喜夏-厌秋 提交于 2019-12-18 10:30:44
问题 I have two views that need to be shown modally, one after the other. This doesn't work if we dismiss and show consecutively, like this: [rootController dismissModalViewControllerAnimated: YES]; [rootController presentModalViewController: psvc animated: YES]; The second modal view simply doesn't show up. I've seen a fix that was something like this: [rootController dismissModalViewControllerAnimated: YES]; [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; [self

iPad 'dismiss keyboard' button doesn't dismiss keyboard

笑着哭i 提交于 2019-12-18 09:48:35
问题 I have a UITextField in a Landscape view, and when I press the 'dismiss keyboard' button in the lower right of the UIKeyboard view, the keyboard does NOT disappear. Is there a way to programmatically listen for when this key was pressed? Or is there a connection I am not seeing that will make this keyboard go away? This is iOS 4 and XCode 4. Thanks. 回答1: I had same problem today and I wondered, wy it works in Apple's KeyboardAccessory Sample Code. So I did reverse engineering. The

iOS dismiss UIAlertView beforing showing another

北战南征 提交于 2019-12-17 21:56:39
问题 I have a Utils class which shows UIAlertView when certain notifications are triggered. Is there a way to dismiss any open UIAlertViews before showing a new one? Currenty I am doing this when the app enters the background using [self checkViews:application.windows]; on applicationDidEnterBackground - (void)checkViews:(NSArray *)subviews { Class AVClass = [UIAlertView class]; Class ASClass = [UIActionSheet class]; for (UIView * subview in subviews){ if ([subview isKindOfClass:AVClass]){ [

How to dismiss a navigation controller presented from another navigation controller in iOS 10 and below?

夙愿已清 提交于 2019-12-13 20:08:24
问题 I'm presenting a UINavigationController from another UINavigationController like this: let customNavigationController = CustomNavigationController() customNavigationController.viewControllers = [myController] customNavigationController.modalPresentationStyle = .custom self.navigationController.present(customNavigationController, animated: true, completion: nil) Then, when a "close" button tapped, I try to dismiss it like this: navigationController.dismiss(animated: true, completion: nil) That

iOS 5 SDK treating UIViews differently

安稳与你 提交于 2019-12-13 13:16:13
问题 My app which use to work perfectly being compiled in xCode 4.0.2 no longer works correcly compiled in xCode 4.2 with the new SDK. My modal views are working very different, some states not being detected, or other dismissals not working. For example this use to work to dismiss 2 stacked modal views: if(self.parentViewController.parentViewController) [self.parentViewController.parentViewController dismissModalViewControllerAnimated:YES]; else [self dismissModalViewControllerAnimated:YES]; Now

Android: popUp and button to dismiss doesnt work

送分小仙女□ 提交于 2019-12-13 05:28:11
问题 I have: popUp.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" .... <Button android:id="@+id/ok_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="ok" android:gravity="left" /> </LinearLayout> main.java @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R

How to dismiss a popover only with a button in swift

一个人想着一个人 提交于 2019-12-12 06:19:13
问题 My iPad app has several data gathering popovers, and I want to be able to disable the dismissal of the popover by touching outside of it, I then will use a button to quit the popover at the users discretion. The app looks great, the popovers work fine, and I have a button inside them that quits nicely. Only I can't find a way of disabling dismissal in Swift, lots of posts on obj-c but nothing in Swift. Does this mean that the functionality is no longer available? I would greatly appreciate

Reload Data On View Controller Dismiss

可紊 提交于 2019-12-12 01:27:55
问题 I have a table view, which populates data from the web. To add information to this list I have a configuration screen presented modally. When data is added successfully the configuration screen is dismissed, I would like the data in the table view to automatically reload from the web to reflect the newly added data. What is the best way to go about reloading this remote data after the configuration view is dismissed. I have tried a number of approaches including using a delegate to send

Dismissing View Controller Doesn't Work While Using Navigation Controller

偶尔善良 提交于 2019-12-11 23:23:30
问题 I have two view controllers. The first one is embedded in a Navigation Controller. On the first view controller there is Bar Button Item which is connected by a segue to the second view controller. The segue is set as Push. Once I go to the second view controller there is a Bar Button Item which is an IBAction and should dismiss the page, but it doesn't. Second View Controller Code: import UIKit class Page2ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() }

Pop-up does not dismiss

↘锁芯ラ 提交于 2019-12-11 21:46:51
问题 I have a EditText view, <EditText android:layout_weight="1" android:id="@+id/etMiktar" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/miktarHint" android:focusable="false"> </EditText> And I implemented a pop-up window which opens when the user touches this EditText view. This pop-up window has a button, so when clicked pop-up supposed to be dismissed. Although it gets my clicks, the pop-up does not close. Here is my pop-up implementation: private void