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 TweetDetailViewController: UIViewController { | |
override func viewDidLoad() { | |
self.navigationItem.title = "Detail" | |
} | |
} |
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 TimelineViewController: UITableViewController, UITableViewDelegate, UITableViewDataSource { | |
let cellIdentifier = "tweetCell" | |
var tweets:[Dictionary<String, AnyObject>]? | |
override func viewDidLoad() { | |
super.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
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet var loginButton: UIButton! | |
var accountsList:[Dictionary<String,String>]? | |
var tweets:[Dictionary<String, AnyObject>]? | |
override func 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
accountsList = [["name":"Hiro"], ["name":"Account BBB"], ["name":"Account CCC"]] | |
tweets = [ ["name": "Hiro", "description": "My name is AAA", "icon":"twitter_icon"], | |
["name": "Account BBB", "description": "My name is BBB", "icon":"user_b_icon"], | |
["name": "Account CCC", "description": "My name is CCC", "icon":"user_c_icon"], | |
["name": "Account BBB", "description": "How old are you, CCC?", "icon":"user_b_icon"], | |
["name": "Account CCC", "description": "My old is 17.", "icon":"user_c_icon"]] |
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.view.backgroundColor = .whiteColor() | |
// ジェスチャーの生成 | |
var aSelector = Selector("tapGesture:") | |
var tapGestureRecognizer = UITapGestureRecognizer(target: self, action: aSelector)) | |
// ビューの生成 |
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
// 角丸 | |
view.layer.cornerRadius = 2.0 | |
// シャドウ | |
View.layer.shadowColor = .blackColor() /* 影の色 */ | |
View.layer.shadowOffset = CGSizeMake(10.0f,10.0f) /* 影の大きさ */ | |
View.layer.shadowOpacity = 0.5 /* 透明度 */ | |
View.layer.shadowRadius = 10.0 /* 影の距離 */ |