UITextView-创新互联

创新互联公司-专业网站定制、快速模板网站建设、高性价比南通网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式南通网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖南通地区。费用合理售后完善,十余年实体公司更值得信赖。> 1 1.text:设置textView中文本 2 _textView.text = @"Now is the time for all godd developers to come to serve their country";//设置它显示的内容 3 4 2.font:设置textView中文字的字体 5 _textView.font =[UIFont fontWithName:@"Arial" size: 18.0];//设置字体名字和字体大小 6 7 3.textColor:设置textView中文本的颜色 8 _textView.textColor = [UIColor blacColor];//设置textView里面的字体颜色 9 10 4.textAlignment:设置textView的文本的排列方式 11 _textView.textAlignment = NSTextAlignmentCenter;//textView中的文本排列,默认靠左12 13 5.backgroudColor:设置textView的背景颜色 14 _textView.backgroudColor = [UIColor grayColor];//设置浅灰色的背景色,默认为白色15 16 6.delegate:设置代理 17 _textView.delegate = self;//设置代理 ,需要引入对应的协议18 19 7.editable:设置textView是否可被输入 20 _textView.editable = NO;//textView是否可被输入,默认为YES21 22 8.attributedText:设置默认插入textView的文字 23 _textView.attributedText = [[NSAttributedString alloc ] initWithString:@"attributedText_-abc"];//可以方便将文本插入到UITextView中24 25 9.inputView:设置从底部弹出的视图 26 _textView.inputView=[[UIDatePicker alloc]init];//弹出视图,默认为键盘27 28 10.inputAccessoryView:设置弹出视图上方的辅助视图 29 _textView.inputAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];//弹出视图上方的辅助视图30 31 11.clearsOnInsertion:设置textView获得焦点,在用户使用虚拟键盘进行输入时,清除之前的文本 32 _textView.clearsOnInsertion =YES;//clearsOnInsertion ,默认为NO
网页题目:UITextView-创新互联
当前URL:http://csdahua.cn/article/coicgh.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流