程式手刻 emoji 表情符號 & logo

挑選喜歡的 emoji 表情符號 & logo,從程式一步一腳印將它刻出來吧 !

提示

如何製作半圓形的微笑曲線

方法 1: 利用 UIBezierPath

方法 2 : 利用 clipsToBounds & cornerRadius

var rect = CGRect(x: 0, y: -50, width: 100, height: 100)let smileView = UIView(frame: rect)smileView.layer.borderWidth = 10smileView.layer.borderColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1).cgColorsmileView.layer.cornerRadius = 50smileView.clipsToBounds = truerect = CGRect(x: 0, y: 0, width: 100, height: 50)let smileBackgroundView = UIView(frame: rect)smileBackgroundView.addSubview(smileView)smileBackgroundView.clipsToBounds = true

--

--

彼得潘的 iOS App Neverland
彼得潘的 100 道 Swift iOS App 謎題

彼得潘的iOS App程式設計入門,文組生的iOS App程式設計入門講師,彼得潘的 Swift 程式設計入門,App程式設計入門作者,http://apppeterpan.strikingly.com