Hi guys,
I am having some problems with changing views when I click on "Settings" button of navigation controller. To be more specific, here is my initialization code(for the button):
Code:
- (id)initWithStyle:(UITableViewStyle)style {
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
if (self = [super initWithStyle:style]) {
self.title = @"pingdom";
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
initWithTitle:NSLocalizedString(@"Settings", @"")
style:UIBarButtonItemStyleBordered
target:self
action:@selector(GoToSettings:)];
self.navigationItem.rightBarButtonItem = addButton;
}
return self;
}
and here is the function where I tell my app delegate to change view
Code:
-(void) GoToSettings {
LuckyAppDelegate *md = (LuckyAppDelegate *)[[UIApplication sharedApplication] delegate];
[md CheckViewToSettingsView:self];
}
When I use this code outside the button function it works flawlessly. However, inside it, it just pops up debugger mode.
I hope that you understand my problem and have the appropriate solution
Regardz,
Mladen