【问题标题】:How can i remove vertical line from UITextView and typed text from left side in DALinedTextView?如何从 UITextView 中删除垂直线并从 DLinedTextView 的左侧输入文本?
【发布时间】:2016-03-22 06:06:36
【问题描述】:

我将DALinedTextView 用于内衬UITextView。我想删除红色垂直线并从左侧输入文本。我怎样才能做到这一点。提前致谢。

【问题讨论】:

    标签: ios objective-c uitextview nstextcontainer


    【解决方案1】:

    Comment[appearance setVerticalLineColor:DEFAULT_VERTICAL_COLOR]; 中的initialize 方法DALinedTextView 中的[appearance setVerticalLineColor:DEFAULT_VERTICAL_COLOR];,如果您不想发表评论,只需将#define DEFAULT_VERTICAL_COLOR 的颜色更改为[UIColor clearColor] 或任何其他颜色。 在此之后在您的viewController viewDidLoad 方法更改textContainerInset 喜欢--

    self.textView.textContainerInset = UIEdgeInsetsMake(18.0f, 0.0f, 8.0f, 10.0f);
    

    你可以根据你的值改变光标位置。

    【讨论】:

    • 感谢 dev.rk 为我更改边缘插图所做的工作.. 现在使用这种方法删除了我的红线评论 [外观 setVerticalLineColor:DEFAULT_VERTICAL_COLOR];
    • 如果您的问题得到解决,请随时接受答案。以便其他人可以从中受益。
    猜你喜欢
    • 2019-03-23
    • 1970-01-01
    • 2018-05-29
    • 1970-01-01
    • 2017-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多