Bind Action to UIButton
In my AppController I'm loading a View with the following code. 

    - (void) loadSettingsController {
    	settingsViewController = [[SettingsViewController alloc] initWithNibName:@"SettingsView" bundle:nil];
    	UIButton *button = settingsViewController.loginButton;
    	[button addTarget:self action:@selector(saveSettings:) forControlEvents:UIControlEventTouchUpInside];
    }

    - (IBOutlet) saveSettings:(id) sender

The view is later on added to the window with the code
		

    [window addSubview:[settingsViewController view]];

Everything works fine, but the action saveSettings doesn't get called when I press the button while using the debugger. The "loginButton" property is connected to the button in the Interface Builder.

Can you see anything wrong with this code?


Bind Action to UIButton
===

In my AppController I'm loading a View with the following code. 

    - (void) loadSettingsController {
    	settingsViewController = [[SettingsViewController alloc] initWithNibName:@"SettingsView" bundle:nil];
    	UIButton *button = settingsViewController.loginButton;
    	[button addTarget:self action:@selector(saveSettings:) forControlEvents:UIControlEventTouchUpInside];
    }

    - (IBOutlet) saveSettings:(id) sender

The view is later on added to the window with the code
		

    [window addSubview:[settingsViewController view]];

Everything works fine, but the action saveSettings doesn't get called when I press the button while using the debugger. The "loginButton" property is connected to the button in the Interface Builder.

Can you see anything wrong with this code?

