#pragma mark ----textView delegate
-(BOOL) textViewShouldBeginEditing:(UITextView *)textView
{
if(textView.tag == 0) {
textView.text = @"";
textView.textColor = [UIColor colorWithHex:0x666666 alpha:1];
textView.tag = 1;
}
return YES;
}
-(void)textViewDidEndEditing:(UITextView *)textView
{
if([textView.text length] == 0)
{
textView.text = @"文章内容";
textView.textColor = [UIColor colorWithHex:0xe1e1e1 alpha:1];
textView.tag = 0;
}
}
UiTextView的提示文字效果
最新推荐文章于 2022-06-04 10:41:23 发布