Hey guys,
So I'm pretty new to Objective-C and kind of just learning as I go here. So I have a method that passes on its sender when called to another method. So when called internally I can call it like this:
[self insertNewDBInfoConnection:sender];
Here's where I hit a bump in the road. this insertNewDBInfoConnection: is only going to be called when the user selects an option in an alert view which is set up like so:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if([alertView.title isEqualToString:@"Would you like to save?"]) {
switch(buttonIndex) {
case 0:
[self insertNewDBInfoConnection:sender];
[self dismissModalViewControllerAnimated:YES];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
break;
case 1:
[self dismissModalViewControllerAnimated:YES];
break;
}
}
}
So ofcourse I can't just call [self insertNewDBInfoConnection:sender]; anymore because it doesn't know what sender is. So how to do I again access that methods sender externally here. A very simple solution I'm sure, but again, learning as I go.
Thanks in advance.