I want to add a Bar button to the Navigation bar on a Navigation based app, the bar however is on the MainWindow and has no code behind so I Can't connect it to an IBAction.
how do i go about connecting it to an action ?
I want to add a Bar button to the Navigation bar on a Navigation based app, the bar however is on the MainWindow and has no code behind so I Can't connect it to an IBAction.
how do i go about connecting it to an action ?
You can add the button to the navigation bar programmatically like this and also connect it up to an action with the init code:
UIBarButtonItem* button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:<UIBarButtonStyle that you want> target:self action:@selector(<some_action>:)];
self.navigationItem.rightBarButtonItem = button;
[button release];