Mobile

  • Published on
    介绍 swift 网络搜索热词排行相关内容,包括接口使用、库文件、桥接头文件等,还有数据管理、视图控制器等代码示例及 github 地址和截图,点击热搜词可在百度搜索。
  • 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 来尝试显示,但未成功。
  • Published on
    2017 年 6 月 10 日的文章介绍 swift UITableView cell 自适应高度。ios8 支持,需在 viewDidLoad 中设置 estimatedRowHeight 和 rowHeight,在 cellForRowAtIndexPath 中设置 textLabel 的行数和宽度,heightForRowAtIndexPath 设为 UITableViewAutomaticDimension。
  • Published on
    react native 中出现“Can only update a mounted or mounting component.”警告,因_countdown 方法中每秒递减秒数,组件 unmounted 后 timer 未停止。解决办法是在 componentWillUnmount 中 clearTimeout,修改后的代码片段如上。
  • Published on
    此为 React Native 布局头像标题简介的代码示例。通过`ItemBox`组件展示头像、标题和简介,`App`组件设置相关样式和数据,最后注册组件。整体实现简单的布局展示效果。
  • Published on
    这是关于 android app 微信热门文章精选的介绍。用 react native 做小软件,通过 showapi 获取文章,展示了 index.android.js 中初始化文章列表等内容,还有 articleList.js 的文章列表显示等,以及 showArticle.js 和 typeList.js 的相关部分。
  • Published on
    2017 年 1 月 8 日的“android app 笑话”,用 react native 开发,通过 showapi 获取多种笑话内容,github 地址及 apk 下载地址已给出,react-native-scrollable-tab-view 组件好用且代码可看 github。