這看起來不對,我是對嗎?這是我使用的代碼:我寫這段代碼錯了嗎?
_editButton = [[UIBarButtonItem alloc] initWithTitle:@"Back"
style:UIBarButtonItemStylePlain
target:self
action:@selector(editButtonPressed:)];
// If we have no threads we don't have the edit button
self.navigationItem.leftBarButtonItem = _editButton ; nil;
主要是我所關心的self.navigationItem.leftBarButtonItem = _editButton ; nil;
的_editButton ; nil;
看來我錯了。
該代碼應該是這樣嗎? self.navigationItem.leftBarButtonItem = _editButton;