I want to output the .nib "TableViewController" when the "Finish" button is clicked on my UIToolBar. But below is not allowed to click to open a new view. How to fix this? Please show me where I did wrong and what needs to be replaced and why.
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:
UIBarButtonSystemItemDone target:self action:@selector(doneButtonPressed)];
-(void)doneButtonPressed {
TableViewController *tableView = [[TableViewController alloc]
initWithNibName:@"TableViewController" bundle:nil];
tableView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:tableView animated:YES];
}
Suppose you have to pull the tip out of the barbuttonitem, which is on the overlay of the UItoolbar. How do you do this?
I was told that for proper operation I should add [barButtonItem addTarget: self action: @selector (doneButtonPressed) forControlEvents: UIControlEventTouchUpInside] ;,
But if I add it, I get the following:
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:
UIBarButtonSystemItemDone addTarget:self action:@selector(doneButtonPressed)
forControlEvents:UIControlEventTouchUpInside];
"instance method" - initWithBarButtonSystemItem: target: action: forControlEvents: 'not found ( -' id ') "
, , , , .