dismiss

How to dismis custom dialog from a custom button in dialog?

我怕爱的太早我们不能终老 提交于 2020-01-06 12:41:13
问题 Hi there, @Override protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder = new AlertDialog.Builder(this); inviteView = getLayoutInflater().inflate(R.layout.invite_dialog, null); builder.setView(inviteView); sendSmsButton = (Button) inviteView.findViewById(R.id.sendSMSButton); sendEmailButton = (Button) inviteView.findViewById(R.id.sendEmailButton); builder.setTitle(R.string.invite_callrz_title); sendSmsButton.setOnClickListener(new OnClickListener() { @Override public void

How to dismis custom dialog from a custom button in dialog?

左心房为你撑大大i 提交于 2020-01-06 12:39:23
问题 Hi there, @Override protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder = new AlertDialog.Builder(this); inviteView = getLayoutInflater().inflate(R.layout.invite_dialog, null); builder.setView(inviteView); sendSmsButton = (Button) inviteView.findViewById(R.id.sendSMSButton); sendEmailButton = (Button) inviteView.findViewById(R.id.sendEmailButton); builder.setTitle(R.string.invite_callrz_title); sendSmsButton.setOnClickListener(new OnClickListener() { @Override public void

How to dismiss a certain view controller

风流意气都作罢 提交于 2020-01-06 08:19:28
问题 how can I dismiss a view controller beside the one that the user is currently in? I need to replace self with the view controller name, but I get SIGABRT when I do so. What do I need to do? Thanks! [self dismissModalViewControllerAnimated:NO]; 回答1: Try [self.parentViewController dismissModalViewControllerAnimated: YES]; 来源: https://stackoverflow.com/questions/6969190/how-to-dismiss-a-certain-view-controller

iPad - Dismiss keyboard for modal view controller in UIModalPresentationFormSheet mode

五迷三道 提交于 2020-01-06 05:23:35
问题 In my iPad app I want to present some view controllers in UIModalPresentationFormSheet modal mode without keyboard . I use it to display help as an example. At the moment I use the code found on the one of stackoverflow answers to dismiss it: // trick to dismiss keyboard in iPad: if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ // iPad specific behaviour: @try { Class UIKeyboardImpl = NSClassFromString(@"UIKeyboardImpl"); id activeInstance = [UIKeyboardImpl performSelector:@selector

Frequently Camera capture crashing the app without any clue

本小妞迷上赌 提交于 2020-01-05 05:52:07
问题 I am using UIIMagePicker Controller for capturing image. The camera capture works fine for first 30 to 40 shots but it will crash the app after around 40 captures. I do not get any memory warning or crash report on xcode. This issue look like memory leak but i have monitored Instruments and memory use is not going more then 60 MB. The image pick from gallery do not cause this issue. Code i am using :- - (void)imagePickerController:(UIImagePickerController *)picker

Dismiss the keyboard with MULTIPLE UITextFields?

喜你入骨 提交于 2020-01-02 05:47:10
问题 Is it possible to dismiss the keyboard when you have MULTIPLE UITextFields ? If so how ? As a side note, do I have to dismiss the keyboard for Each and Every field or can it be done globally ? Oh and it would be super cool if I don't have to touch the DONE button, I'd ideally like a solution that where the user touches anything BUT the field in question and the keyboard automagically disappears... Oh and if you'd be so kind step by step instructions. I should have added that I have a method

iOS SDK: Dismiss keyboard when a button gets clicked?

做~自己de王妃 提交于 2020-01-02 04:32:55
问题 How can I dismiss the keyboard when the user clicks a button? A short example for a better understanding: the user edits some text in some textfields and at the end he doesn't click "Done" or smething else on the keyboard, but he clicks on an button "Save" while the keyboard is still shown. So, how can I now dismiss the keyboard? Thx. Regards, Daniel 回答1: in button action write, if([textField isFirstResponder]){ [textField resignFirstResponder]; } if there are more textfields get the current

Dismiss MPMoviePlayerViewController on play error

只谈情不闲聊 提交于 2019-12-30 05:14:05
问题 I have a problem with the MPMoviePlayerViewController: If the controller can't find the movie at the specified URL it displays a white screen and I can't make it go close. This is how I start the movie player: - (void) playVideo:(NSString*)path { NSURL* url = [NSURL URLWithString:path]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; double osversion = [[[UIDevice currentDevice]

`unrecognized selector sent to instance <OBJ_ADR>`after sending `dismissViewControllerAnimated:completion` to a UIViewController

别等时光非礼了梦想. 提交于 2019-12-29 09:19:29
问题 Lots of similar questions but non with a solution that works in my case. I try to write a simple FlipSideApp. Just two views with a single button each (flipBtn | flopBtn) to present the other view vice versa. flip on the first view works fine. flop on the other view causes a unrecognized selector sent to instance 0x6c3adf0 . The App crashes after calling [self dismissViewControllerAnimated:YES completion:nil]; in file FlipSide.m (see code below). Where 0x6c3adf0 is the current address of self

How do I recover the “text” from the page originating the alert, esp **after** the human user has *clicked* [dismiss] on the page's **alert**?

筅森魡賤 提交于 2019-12-28 01:39:27
问题 Basically, when an alert is popped up in javascript, I can dismiss() it from python perfectly OK, by calling selenium.webdriver.common.alert.Alert(browser).dismiss() . However, if the "browser user" dismisses the alert by clicking [OK] (on screen) with their mouse, then the browser alert gets "Lost in Space" the body.text can no longer be accessed from python. So... How do I recover the "text" from the page originating the alert, esp after the human user has clicked [dismiss] on the page's