警告与journalComment.delegate =自行:分配来自不兼容的类型的 'id' 'JournalEntryViewController *'的OBJÇ - UITextViewDelegate不兼容的类型警告
journalComment是一个TextView。
我不确定警告是什么,它应该只是说 - 警告:“键盘上的newb,去一些对象类。”
谢谢你的帮助。
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
// Hide keyboard when done key is pressed
// define the area and location for the UITextView
CGRect tfFrame = CGRectMake(0, 0, 320, 460);
journalComment = [[UITextView alloc] initWithFrame:tfFrame];
// make sure that it is editable
journalComment.editable = YES;
// add the controller as the delegate
journalComment.delegate = self;
}
return self;
}
接口既可以是和? –
rd42
2011-04-11 15:09:15
nevermind http://stackoverflow.com/questions/4361148/objective-c-multiple-delegates – rd42 2011-04-11 15:10:53