I have this piece of code in the controller
- (Void) viewDidLoad
{
UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithTitle: @ "add" style: UIBarButtonItemStyleBordered target: self action: @ selector (addANote :)];
self.navigationItem.rightBarButtonItem = addButton;
[AddButton release];
[Super viewDidLoad];
/ / Do any additional setup after loading the view from its nib.
}
However, when running, a click on the Add button will be abnormal, the breakpoint break in movl 8 (% edx),% edi, in the code there is a method to this addANote, scholarship ios did not take long, really do not know how, help us to see, thank you
Reply:
And in @ selector (after losing at the beginning does not automatically add three letters to search out addANote this method, the point of the button throwing an exception EXC_BAD_ACCESS
Reply:
where viewcontroller viewDidLoad whether this approach is to define and document the delegate used?
If so, please delegate header file viewcontroller
This is a very old a BUG
Reply:
addANote function entire function body sent to Chou Chou
Reply:
Sorry, forgot to reply to the question I have been resolved, I release the wrong hands, thank you for your
No comments:
Post a Comment