Lesson2 - font

效果图

QQ20180316-160258.gif

项目代码地址

为tableview注册cell的时候发现和OC的不同点有点大,备注下

fontTableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: "fontCell")

直接找的系统的字体进行修改的,方法如下

for family in UIFont.familyNames {
            for font in UIFont.fontNames(forFamilyName: family){
                print(font)
            }
        }

var fontNames = ["AppleSDGothicNeo-SemiBold", "PingFangTC-Medium", "AcademyEngravedLetPlain", "HelveticaNeue-CondensedBlack", "AvenirNextCondensed-UltraLight"]

你可能感兴趣的:(Lesson2 - font)