uialertview

EXC_BAD_ACCESS on UIAlertview code=1

故事扮演 提交于 2019-12-22 04:33:27
问题 I am getting the EXC_BAD_ACCESS on [alert show] line. Why I am getting this? alert = [[UIAlertView alloc]initWithTitle:@"Application Alert" message:@"all date popup" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Update",nil]; [alert show]; //EXC_BAD_ACCESS on this line 回答1: Just make delegate nil ,don't apply self to delegate .code it like below alert = [[UIAlertView alloc]initWithTitle:@"Application Alert" message:@"all date popup" delegate:nil cancelButtonTitle:nil

<_UIPopoverBackgroundVisualEffectView> is being asked to animate its opacity

旧街凉风 提交于 2019-12-22 03:58:33
问题 I am trying to show an (AlertController) Action sheet. But I am getting this waning in console " <_UIPopoverBackgroundVisualEffectView 0x7fd65ef76ec0> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1. " here is my code :- extension GroupDataView { func callDot (sender : UIButton) { let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "Edit Group", style: .default

set alertview Yes button to bold and No button to normal

喜夏-厌秋 提交于 2019-12-22 03:50:31
问题 I have alertview where I have Yes and No options. It looks like below. Code used is UIAlertView *confAl = [[UIAlertView alloc] initWithTitle:@"" message:@"Are you sure?" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No", nil]; confAl.tag = 888; [confAl show]; This is perfect but I want Yes to be bold and No as normal font. So I switched the Yes and No button and have like below. Code used is UIAlertView *confAl = [[UIAlertView alloc] initWithTitle:@"" message:@"Are you sure?"

Weird SIGABRT (unrecognized selector sent to instance) when using UIAlertView

倖福魔咒の 提交于 2019-12-22 01:34:27
问题 I've been bashing my head in with this one for the past half hour, so I thought I'd ask my friends from Stack Overflow for some wisdom. I've got a tab bar application with a view controller at the root, and passing off the views to other xib s. I created a custom XIB and added its view controller class ( MoreViewController ) as an External Object in Interface Builder. When I link my methods, I get a SIGABRT error when calling the method with a UIButton : Method - (IBAction)showAbout { alert =

how to color specific words in a uialertview or UIAlertController ? (SWIFT)

我与影子孤独终老i 提交于 2019-12-22 01:19:04
问题 is there a way to color some specific words in uialertview ? I mean, can I color the word RED as red and at the same time GREEN as green ? Can someone bring me on the right way? 回答1: You could make use of NSAttributedString and UIAlertController : let strings = [["text" : "My String red\n", "color" : UIColor.redColor()], ["text" : "My string green", "color" : UIColor.greenColor()]]; var attributedString = NSMutableAttributedString() for configDict in strings { if let color = configDict["color

How to respond to UIImagePickerController Generated UIAlertView

蹲街弑〆低调 提交于 2019-12-22 00:12:12
问题 I am using UIImagePickerController to capture video from my app and i have set video maximum duration to 30 seconds. When that 30 seconds limit is reached. I get an alert with a message "maximum video recording limit reached" produced by UIImagePickerController and it stops capturing video. What I want is that I want to respond to that alert that is generated automatically when 30 seconds limit is reached. I want to perform some action when "OK" button of that alert is pressed. I have

Can't use Control Center when UIAlertView displayed (iOS 7)

寵の児 提交于 2019-12-21 21:41:21
问题 So i set up a retry connection when reachability detects no connection. I want the user to be able to use the Control Center to re-enable WiFi while the UIAlertView is presented. Anyway I can do this? Picture Of What Control Center Looks Like Picture Of A UIAlertView 来源: https://stackoverflow.com/questions/20225928/cant-use-control-center-when-uialertview-displayed-ios-7

Iphone presentLocalNotificationNow not triggering alert and sound while app in background

隐身守侯 提交于 2019-12-21 21:19:41
问题 I have an App registers for location updates, running tests, sometime when I enter a region while the app is in the background I receive a alarm notification with sound. sometime I only see the notification in notification center, and i did not receive any sound and alert... What can you do to always get the sound and the alert notification ? this is what i have in my view UILocalNotification *localNotif = [[UILocalNotification alloc] init]; localNotif.fireDate = nil; localNotif.hasAction =

UIAlertView shown from background thread and with no delegate creates EXC_BAD_ACCESS

旧时模样 提交于 2019-12-21 09:08:31
问题 Here is my code: #ifdef DEBUG UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"ERROR" message:@"JSON Parsing Error" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; [alertView release]; #endif This code is executed in a background thread (responsible for parsing), and the error only happens every other time. Any idea on what is the problem here? 回答1: Dont mess with the UI from the background thread. Create a method and call that method on the main

UIAlertView shown from background thread and with no delegate creates EXC_BAD_ACCESS

淺唱寂寞╮ 提交于 2019-12-21 09:07:55
问题 Here is my code: #ifdef DEBUG UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"ERROR" message:@"JSON Parsing Error" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; [alertView release]; #endif This code is executed in a background thread (responsible for parsing), and the error only happens every other time. Any idea on what is the problem here? 回答1: Dont mess with the UI from the background thread. Create a method and call that method on the main