Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

in my application i was using UIAlertView for login, it contains TextFields, its working perfectly, but i'm getting a warning when i compile the code, i'm using iphone SDK 3.0

code :

loginAlert = [[UIAlertView alloc] initWithTitle:@"Enter the User Name and Password" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Login", nil];
  
[loginAlert addTextFieldWithValue:appDelegate.userName label:@"UserName"];

warning: 'UIAlertView' may not respond to '-addTextFieldWithValue:label:'



txfUserName = [loginAlert textFieldAtIndex:0];

warning: 'UIAlertView' may not respond to '-textFieldAtIndex:'

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
640 views
Welcome To Ask or Share your Answers For Others

1 Answer

This method is private, you should not use it (your app will be rejected). Maybe they removed or renamed it in the latest SDK. For an alternative, see

http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...