All Posts

  • Published on
    在 UIViewController 中加入 Table View 并设 Content 为 Static Cells 会报错,解决方法为将放置 Table View 改为 Container View 或拖出单独 Table View Controller 并关联,即可成功。
  • Published on
    介绍 swift 分享到微信的步骤,需申请 AppId 并下载 sdk 导入工程,链接相关库,添加桥接头文件等,还可分享文字、文章到朋友、朋友圈及收藏,调试需装微信,提供 github 地址。
  • Published on
    文章介绍给 UITableView 增加拷贝功能。通过两个函数实现,一个用于执行拷贝操作(若满足条件则将对应内容的 url 拷贝到粘贴板),另一个用于判断是否可执行拷贝动作,还设置了应显示菜单的条件为 true。
  • Published on
    This code shows a Swift delegate example. It defines a `ModelDelegate` protocol with methods. The `Model` class has a delegate property and a `count` variable. The `View` class conforms to the protocol and implements the methods. An instance of `Model` and `View` is created, and the delegate is set. The `count` property is changed, triggering the delegate methods.
  • Published on
    2017 年 6 月 10 日,关于 swift UILabel 不显示 html 标签的讨论。通过将带 html 标签的文本转成 NSAttributedString 并设置给 label 的 attributedText 来尝试显示,但未成功。