对象味精发送错误即将到来
|
我正在尝试执行以下操作
- (void)textViewDidChange:(UITextView *)textView{
if(textView == txtYourTip){
if([txtYourTip.text length] < 100){
strTip = txtYourTip.text;
NSLog(@\"%@\",strTip);
} else {
NSLog(@\"%@\",strTip);
txtYourTip.text = strTip;
}}
当控件转到其他部分时,应用程序崩溃。 strTip的类型为NSString。
viewDidLoad包含
txtYourTip = [[UITextView alloc] initWithFrame:CGRectMake(15, 80, 290, 80)];
[txtYourTip.layer setBorderColor:[[UIColor lightGrayColor] CGColor]];
[txtYourTip setDelegate:self];
[txtYourTip setContentInset:UIEdgeInsetsMake(10, 10, 10, 10)];
txtYourTip.layer.cornerRadius = 10.0;
[txtYourTip.layer setBorderWidth:2.0];
[contentView addSubview:txtYourTip];
strTip = [[NSMutableString alloc] init];
没有找到相关结果
已邀请:
1 个回复
森含械
要么
任何人都应该工作,并且需要:
在视图viewDidUnload中,这样就不会泄漏