2014/2/1
六本木ヒルズ森タワー 14F
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ACSViewController.h" | |
#import <AWSCloudWatch/AWSCloudWatch.h> | |
@interface ACSViewController () | |
@end | |
@implementation ACSViewController | |
- (void)viewDidLoad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let someCGFloat: CGFloat = 0.25 | |
var text = String(format: "%.01f", Float(someCGFloat)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class func className() -> String { | |
var className = NSStringFromClass(self) | |
var range = className.rangeOfString(".") | |
return className.substringFromIndex(range!.endIndex) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pod 'Bolts', '~> 1.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class RoundedCornersView: UIView { | |
override func drawRect(rect: CGRect) { | |
UIBezierPath(roundedRect: self.bounds, cornerRadius: CGRectGetHeight(self.bounds) / 2).addClip() | |
UIImage(named: "rocket")?.drawInRect(self.bounds) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Snappy | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// FULL SCREEN VIEW [BLUE] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// とりあえず、fontと表示したいテキストを用意 | |
let font = UIFont.systemFontOfSize(20.0) | |
let text = "T" | |
// 上記で用意したfontを利用した場合のテキストのサイズを取得 | |
var attributes = [NSObject: AnyObject]() | |
attributes[NSFontAttributeName] = font | |
let size = text.sizeWithAttributes(attributes) | |
// テキストのサイズから表示するframeを作成 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBDesignable | |
class IconButton: UIControl { | |
@IBInspectable var iconImage: UIImage? | |
override func drawRect(rect: CGRect) { | |
if let iconImage = self.iconImage { | |
iconImage.drawInRect(self.bounds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBDesignable | |
class IconButton: UIControl { | |
@IBInspectable var iconImage: UIImage? | |
override func drawRect(rect: CGRect) { | |
if let iconImage = self.iconImage { | |
iconImage.drawInRect(self.bounds) |
OlderNewer