Hey,
This should be useful for you:
UIAlertView *igcredits = [[UIAlertView alloc] initWithTitle: @"Popup Title Here"
message: @"Made by niro for iOSGods.com"
delegate: self
cancelButtonTitle: @"Cancel"
otherButtonTitles: @"Send", nil];
[igcredits show];
[igcredits release];
return %orig;
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if(buttonIndex !=alertView.cancelButtonIndex) {
// When the send button is clicked, do you sending stuff
}
}
Another way:
UIAlertView *igcredits = [[UIAlertView alloc] initWithTitle: @"Popup Title Here"
message: @"Made by niro for iOSGods.com"
delegate: self
cancelButtonTitle: @"Cancel"
otherButtonTitles: @"Send", nil];
[igcredits show];
[igcredits release];
return %orig;
}
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Send"]) {
// Do your sending stuff here
}
}
You may also find this useful: https://iosgods.com/topic/13988-varieties-of-uialertview-types-to-use-in-your-tweaks-patchers/