プログ

スマホアプリ「コインパズル」開発者の日記https://bit.ly/35gpWAB

2020-05-01から1ヶ月間の記事一覧

swiftでwebカラーを読む

func hex (hexStr : NSString,alpha : CGFloat) -> UIColor { let hexStr = hexStr.replacingOccurrences(of: "#", with: "") let scanner = Scanner(string: hexStr as String) var color: UInt32 = 0 if scanner.scanHexInt32(&color) { let r = CGFloat((…