This file contains hidden or 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
{ | |
"description": "Change left_command+hjkl to arrow keys", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"mandatory": [ | |
"left_command" | |
], |
This file contains hidden or 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 screenSize: CGSize = UIScreen.mainScreen().bounds.size | |
let screenWidth = screenSize.width | |
let screenHeight = screenSize.height | |
let textField001 = UITextField(frame:CGRectMake(0,0,screenWidth/2,screenHeight/8)) | |
textField001.delegate = self | |
textField001.backgroundColor = UIColor.redColor() | |
textField001.layer.position = CGPoint(x:screenWidth/2 ,y:screenHeight/8) | |
//TextFieldのタグ番号 |
This file contains hidden or 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
//ボタンを追加するためのViewを生成します。 | |
let myKeyboard = UIView(frame: CGRectMake(0, 0, 320, 40)) | |
myKeyboard.backgroundColor = UIColor.lightGrayColor() | |
//完了ボタンの生成 | |
let myButton = UIButton(frame: CGRectMake(300, 5, 70, 30)) | |
myButton.backgroundColor = UIColor.darkGrayColor() | |
myButton.setTitle("完了", forState: .Normal) | |
myButton.layer.cornerRadius = 2.0 | |
myButton.addTarget(self, action: "onClickMyButton:", forControlEvents: .TouchUpInside) |
This file contains hidden or 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
//ssk.jpegからsskというImageViewを作成する | |
let ssk = UIImageView(image: UIImage(named: "ssk.jpeg")) | |
ssk.frame = View.bounds | |
//Blurエフェクトを作成 | |
let blurEffect = UIBlurEffect(style: .Light) | |
//Blurエフェクトからエフェクトビューを生成 | |
var visualEffectView = UIVisualEffectView(effect: blurEffect) |
This file contains hidden or 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
//挿入したい画像をsampleimageとして定義 | |
let sampleImage = UIImage(named: "挿入したい画像の名前") | |
let imageView = UIImageView() | |
//imageviewの画像を挿入したい画像に渡す | |
imageView.image = sampleImage | |
self.view.addSubView(imageView) |