如何在UITextView中设置页边距
推荐于2016-08-23
展开全部
self.view.backgroundColor = [UIColor lightGrayColor];
UIView *textViewBg = [[UIView alloc] initWithFrame:CGRectMake(10.0f, 10.0f, 300.0f, 170.0f)];
[self.view addSubview:textViewBg];
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 150.0f)];
textView.backgroundColor = [UIColor whiteColor];
textView.textAlignment = UITextAlignmentLeft;
textView.font = [UIFont systemFontOfSize:16.0f];
[self.view addSubview:textView];
UIView *textViewBg = [[UIView alloc] initWithFrame:CGRectMake(10.0f, 10.0f, 300.0f, 170.0f)];
[self.view addSubview:textViewBg];
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 150.0f)];
textView.backgroundColor = [UIColor whiteColor];
textView.textAlignment = UITextAlignmentLeft;
textView.font = [UIFont systemFontOfSize:16.0f];
[self.view addSubview:textView];
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询