怎么让textView变得不能滑动
推荐于2016-08-08 · 知道合伙人软件行家
关注
展开全部
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20, 100,self.view.frame.size.width-40, 50)];
textView.text = @"fsdfsdfdsfdsfsdfsdfsdfsdf";
textView.layer.borderColor = [[UIColor redColor]CGColor]; //边框的颜色
textView.layer.borderWidth = 1.0f; //边框的宽度
textView.font = [UIFont systemFontOfSize:14.0f]; //字体大小
textView.scrollEnabled = NO; //禁止滑动 UITextView
[self.view addSubview:textView];
textView.text = @"fsdfsdfdsfdsfsdfsdfsdfsdf";
textView.layer.borderColor = [[UIColor redColor]CGColor]; //边框的颜色
textView.layer.borderWidth = 1.0f; //边框的宽度
textView.font = [UIFont systemFontOfSize:14.0f]; //字体大小
textView.scrollEnabled = NO; //禁止滑动 UITextView
[self.view addSubview:textView];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询