美文网首页
Swift3Simple

Swift3Simple

作者: QuerySky | 来源:发表于2017-04-28 17:37 被阅读9次

30DaysofSwift

参考30DaysofSwift编写,主要Allen有UI功底,swift例子不缺审美,成就感倍增。

SwiftSimple

持续更新zhaowensky-github

1. SimpleStopWatch,简单的计时器

涉及东西不多,简单的故事板autolayout设置,使用了Timer控件进行计时,熟悉一下常用的getter、setter属性访问(跟OC区别挺大),通常OC里的@synthesize <#property#>都是自动生成,但swift却需要自己实现


Simulator Screen Shot 2017年4月28日 下午4.58.50.png
2. SimpleCustomFont,第三方字体库使用

字库作者是从这下载的「造字工房」

  • 将字体库文件导入到工程后,在info.plist中新增key值
    Fonts provided by application
    把你的字体名字加进去
    12.png
  • 通过UIFont访问刚才配置的名字,就可以使用了
    contentLabel.font = UIFont(name:"MFJinHei_Noncommercial-Regular", size:16)
    Simulator Screen Shot 2017年4月28日 下午5.18.30.png
3.SimplePalyLocalVideo,播放本地视频

相关文章

  • Swift3Simple

    30DaysofSwift 参考30DaysofSwift编写,主要Allen有UI功底,swift例子不缺审美,...

网友评论

      本文标题:Swift3Simple

      本文链接:https://www.haomeiwen.com/subject/abrazttx.html