定义
#define BARBUTTON(TITLE, SELECTOR) [[[UIBarButtonItem alloc] initWithTitle:TITLE style:UIBarButtonItemStylePlain target:self action:SELECTOR] autorelease]
使用
self.navigationItem.leftBarButtonItem = BARBUTTON(@"Redo", @selector(redo));
时间: 2024-10-09 08:18:32