Entries from 2014-06-09 to 1 day

Swift UIView Extensions

Swift UIView Extensions。開発中だった iPhone アプリを Swift で書き換えている途中で必要と思った Extension を追加していく。

Swift CGRectMake

CGRect(x:0, y:0, width:320, height:568) は type 数が多い。CGRectMake も使えるのでどちらを使うか迷う。

Swift UIColor(hex:0xcccccc) を作りました

Create UIColor by hex in Swift // // UIColor+Hex.swift // // Created by Taro Minowa on 6/8/14. // Copyright (c) 2014 Higepon Taro Minowa. All rights reserved. // import UIKit extension UIColor { convenience init(hex: Int, alpha: Double = 1…

Swift プログラミング

スキマ時間を見つけてThe Swift Programming Language を読みながら Playground で遊んでいる。 import Cocoa var str = "Hello, playground" var myVariable = 42 myVariable = 50 let myConstant = "hige" //myConstant = 3 let implicitInt = 70 let impl…