【发布时间】:2011-06-17 20:00:34
【问题描述】:
我有一个这样的方法:
- (void)methodWithParameter:(id)parameter {
}
我想用 UIBarButtonItem 来调用它
barButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(methodWithParameter:)];
我想指定参数,但不能使用 withObject: after action: 因为我收到警告:
没有 -initWithBarButtonSystemItem:target:action:withObject: 方法找到
谁能帮我解决这个问题?
【问题讨论】:
标签: iphone objective-c selector