【问题标题】:convert Swift 2.3 to Swift 4 [duplicate]将 Swift 2.3 转换为 Swift 4 [重复]
【发布时间】:2018-02-07 18:39:04
【问题描述】:

我是 Swift 4 的新手,我想用 Uitextview 错误解决 Swift 2.0 版项目

这是 Swift 4 中的错误

let textView = UITextView(frame: CGRectInset(view.bounds, 10, 10))

I will change with 'CGRectInset'已被实例方法'CGRect.insetBy(dx:dy:)'取代

但我不知道如何

我改变了 let textView = UITextView(frame: CGRect.insetBy(view.bounds, 10, 10)) 但又出错了

还有一个问题

textView.textContainerInset = UIEdgeInsetsZero

我会改UIEdgeInsetsZero

【问题讨论】:

    标签: ios swift uitextview cgrect uiedgeinsets


    【解决方案1】:
    let textView = UITextView(frame: view.bounds.insetBy(dx:10,dy:10))
    

    【讨论】:

    • 现在我在过去 10 年的通话中收到了额外的参数
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多