uialertview

UIAlertView with textfield and three buttons issue in ios 6

∥☆過路亽.° 提交于 2019-11-27 19:02:41
问题 UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Enter Student Name" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save", @"Save and Add", nil]; alert.tag = 1; alert.transform=CGAffineTransformMakeScale(1.0, 0.75); alert.alertViewStyle=UIAlertViewStylePlainTextInput; [alert show]; -(void)willPresentAlertView:(UIAlertView *)alertView { if (alertView.tag == 1) { for (UIView *view in alertView.subviews) { if ([view isKindOfClass:[UITextField class]]|| [view

UIAlertView not displaying complete message

ぃ、小莉子 提交于 2019-11-27 18:57:32
问题 I have the following function to display error messages to user. But it does not seem to show the complete message. It will display upto certain characters followed by .... How can I make it show the entire message? (void) showAlert:(NSString*)title forMessage:(NSString*) body { UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:title message:body delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; [alertView release]; } 回答1: There is a way. When you

wait_fences: failed to receive reply: 10004003 - what?

微笑、不失礼 提交于 2019-11-27 18:36:38
问题 Been getting this odd error. heres the deal - in the below method i have an alert view come up, take a U/N and PW, then atempt to start another method. The method -postTweet does not get activated I just get this error in console wait_fences: failed to receive reply: 10004003 Which is really odd - as ive never seen it before - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ if (alertView == completeAlert ) { if (buttonIndex ==1) { passPromtAlert = [

ResignFirstResponder doesn't dismiss the keyboard (iPhone)

故事扮演 提交于 2019-11-27 16:52:00
问题 I've searched through this site that I couldn't find a solution to the problem I'm facing now. Hope someone can help. I've created a UIAlertView to prompt user to enter their name in an iPhone app. UIAlertView *enterNameAlert = [[UIAlertView alloc] initWithTitle:@"Enter your name" message:@"\n\n\n" delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"OK", nil),nil]; UITextField *enterNameField = [[UITextField alloc] initWithFrame:CGRectMake

Problems with getting text from UIAlertView textfield

醉酒当歌 提交于 2019-11-27 15:17:25
问题 In my application I want a alert with a textfield. After clicking on "Done" I want to save the textfield input in a String. After clicking on "Cancel" I want only to close the alert. I've created my alert like this: var alert = UIAlertView() alert.title = "Enter Input" alert.addButtonWithTitle("Done") alert.alertViewStyle = UIAlertViewStyle.PlainTextInput alert.addButtonWithTitle("Cancel") alert.show() let textField = alert.textFieldAtIndex(0) textField!.placeholder = "Enter an Item" println

Showing an alert in an iPhone top-level exception handler

故事扮演 提交于 2019-11-27 15:15:57
问题 I'm trying to display a UIAlertView in a top-level iPhone exception handler. The handler function looks like this: void applicationExceptionHandler(NSException *ex) { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:[ex reason] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; } I've seen similar code elsewhere (for instance, NSSetUncaughtExceptionHandler not catch all errors on iPhone). If I single-step in the debugger, I can see that

Is it possible to edit UIAlertAction title font size and style?

ε祈祈猫儿з 提交于 2019-11-27 15:11:06
Now that iOS8 deprecated UIActionsheet and UIAlertview the customization working on iOS7 is not taking effect anymore. So far the only customization I'm aware is the tint color. And what I need is changing the title's font size and style which I haven't found any way of doing so with the new UIAlertAction . Already referred to this but I'm still hoping there's a way to change at least the title size and font. Providing you some of my code for UIAlertAction UIAlertController * alertActionSheetController = [UIAlertController alertControllerWithTitle:@"Settings" message:@"" preferredStyle

Simple App Delegate method to show an UIAlertController (in Swift)

风流意气都作罢 提交于 2019-11-27 11:30:33
问题 In obj-C when another iOS app (mail attachment, web link) was tapped with a file or link associated with my app. I would then catch this on openURL or didFinishLaunchingWithOptions and show a UIAlertView to confirm the user wants to import the data. Now that UIAlertView is depreciated I am trying to do the same thing but not really sure about the best way to do this? I am having trouble showing a simple alert when my App receives data from another app. This code worked fine in Objective-C

EXC_BAD_ACCESS code 2 on UIAlertView in iOS6

戏子无情 提交于 2019-11-27 11:05:08
问题 I'm trying to figure out why im getting this crash in my app. It works perfectly fine in Xcode 4.4 running in the simulator with ios5.1, but when i switch into xcode 4.5 and ios6 I'm getting an EXC_BAD_ACCESS code 2. Here is my code: - (void) myMethod { UIAlertView *alertview = [[[UIAlertView alloc]initWithTitle:@"Title" message:@"message" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil] autorelease]; alertview.tag = 1 [alertview show]; } this is giving me an EXC_BAD_ACCESS code

UIView Popup like UIAlertView

泪湿孤枕 提交于 2019-11-27 11:00:36
问题 I Want a UIView which can popup like UIAlertView and also can move. Any help please?? Thank you. 回答1: Animate the view's transform using UIView animation (using blocks or older api) from some really small size (like view.transform = CGAffineTransformMakeScale(0.1, 0.1) ) to something a little bigger then you want it to be (like view.transform = CGAffineTransformMakeScale(1.1, 1.1)) , then back to the desired size (view.transform = CGAffineTransformMakeScale(0.1, 0.1)) , or add more steps for