
Untitled
By: a guest on
Apr 17th, 2012 | syntax:
None | size: 0.93 KB | hits: 14 | expires: Never
UIAlertView delegate methods don't response on iOS 5.1
//myClass.h
@interface MainMenu : UIViewController<UIAlertViewDelegate>
-(IBAction)secondAct:(id)sender;
-(IBAction)secondAct:(id)sender
alert = [[UIAlertView alloc] initWithTitle:@"Dear User"
message:@"Your Request Will be Sent To Security"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", nil];
[alert show];
[alert autorelease];
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
NSLog(@"UIAlertView delegate works");//this line too isnt displayed
NSString *title=[ alertView buttonTitleAtIndex:buttonIndex ];
if ([title isEqualToString:@"OK"]) {
NSLog(@"OK Pressed");
}//i want to create something like this