Skip to content

Instantly share code, notes, and snippets.

// 一括でラベルのフォントをヒラギノのサイズ14.0fに統一する
UILabel.appearance().font = UIFont(name: "HiraKakuProN-W3", size: 14.0)
UITextView.appearance().font = UIFont(name: "HiraKakuProN-W3", size: 14.0)
UITextField.appearance().font = UIFont(name: "HiraKakuProN-W3", size: 14.0)
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
let value = UIInterfaceOrientation.LandscapeLeft.rawValue
UIDevice.currentDevice().setValue(value, forKey: "orientation")