Tag: uitextview uiedgeinsets

UITextView contentInset无法在iOS 7上的UITextView中工作?

我试图设置一个UITextView的contentInset属性。 当这样做的时候, UIEdgeInset的topvariables工作得很好。 所以[self.textView setContentInset: 'UIEdgeInsetsMake(50, 0, 0, 0)]; 作品。 但分配UIEdgeInsets的任何其他variables不起作用。 只有top调整。 bottom不调整,也不right 。 所以[self.textView setContentInset: UIEdgeInsetsMake(0, 50, 100, 50)]; 不会对我的textView做任何事情。 我错过了什么吗? 有任何想法吗?

iOS 7 – UITextView剪辑文本

我试图通过使用一个特定的大小的文本视图适合3行文本 [_messageField setContentInset:UIEdgeInsetsMake(-8, -6, 0,0)]; 这适用于iOS 6,但iOS 7似乎是在textview的底部裁剪内容。 下面显示的全部文字都具有相同的字体,文字和边缘插页。 第3行没有出现在iOS 7中。

UITextView contentInset不起作用

我在UITextView中显示文本。 我需要应用一些填充文本。 当我使用价值顶部的位置,它的工作。 如果我使用其他职位的价值,它不工作。 txtt_bgImage = [UIImage imageNamed:@"txtt_bg_ipad.png"]; txtt_bgImageView = [[UIImageView alloc] initWithImage:txtt_bgImage]; txtt=[[UITextView alloc]initWithFrame:CGRectMake(170, 300, 400, 250)]; txtt.text=productDescription; [txtt setFont: [UIFont fontWithName:@"verdana" size:15]]; txtt.textColor=[UIColor whiteColor]; [txtt setBackgroundColor:[UIColor clearColor]]; txtt.contentInset = UIEdgeInsetsMake(15,0,0,0); // [txtt setTextContainerInset:UIEdgeInsetsMake(7, 7, 0, 0)]; txtt_bgImageView.frame=CGRectMake(170, 300, 400, 250); [self.view addSubview:txtt_bgImageView]; txtt.editable=NO; NSLog(@"text is %@",txtt.text); object.object_screentext = txtt; [self.view addSubview:txtt];

如何在ios中为UITextView设置内容embedded

我有一个UITextView和设置内容插入为 [atextView setContentInset:UIEdgeInsetsMake(0, 10, 0, 0)]; 此代码在iOS 6.1及以下版本中工作,但在iOS 7.0中没有任何反应。