开发者社区 问答 正文

关于编辑时UITextView位置发生改变 的问题

创建了一个textView

UITextView*txtview = [[UITextView alloc] initWithFrame:CGRectMake(x,y,25,25)];
txtview.backgroundColor = [UIColor clearColor];
txtview.textColor = [UIColor redColor];
txtview.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:18];
txtview.inputView = segmentKB;
txtview.delegate = self;
[self.view addSubview:txtview];
[txtview sizeToFit];

如果编辑这个textView,就会发生一些移动。

应该怎么解决额?其中inputView是分段控制,如果换成正常的键盘还是会出现这样的问题。

展开
收起
爵霸 2016-03-17 11:03:41 1931 分享 版权
1 条回答
写回答
取消 提交回答
  • 将textView的高度从25改到35

    2019-07-17 19:04:51
    赞同 展开评论
问答地址: