1
EGOTextView *view = [[EGOTextView alloc]initWithFrame:
      CGRectMake(5.0f,5.0f,310.0f,220.0f)];
      view.delegate = (id<EGOTextViewDelegate>)self;
      view.layer.borderWidth = 1.0f;
      view.layer.cornerRadius = 15;
      //view.clipsToBounds = YES;
      view.backgroundColor = [UIColor whiteColor];
      view.returnKeyType = UIReturnKeyDone;  
      //view.contentInset = UIEdgeInsetsZero;
      [self.view addSubview:view];
      self.egoTextView = view;
      self.egoTextView.font = [UIFont fontWithName:@"Helvetica" size:25.0f];
      self.egoTextView.attributedString = string;
      [view release];  
      [view becomeFirstResponder];

上面的代码创建了文本视图,但前两行被隐藏并且不可见。我需要向下滚动才能查看它。

此外,文本集最初不采用提到的字体大小。只有当我输入文本时,我提到的字体大小才会生效。

那么我需要如何解决这个问题。非常感谢你的帮助

4

0 回答 0