티스토리 뷰

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
func createButton () {
        let button = UIButton();
        button.setTitle("Back", forState: .Normal)
        button.setTitleColor(UIColor.blueColor(), forState: .Normal)
        button.frame = CGRectMake(25253530// X, Y, width, height
        button.addTarget(self, action: "buttonPressed:", forControlEvents: .TouchUpInside)
        button.backgroundColor = UIColor(red: (31/255.0), green: (146/255.0), blue: (160/255.0), alpha: 1.0)
        
        button.layer.cornerRadius = 5
        button.layer.masksToBounds = true
        
        self.view.addSubview(button)
}
 
func createImageButton () {
        let button = UIButton();
        button.setImage(UIImage(named: "ic_back_24px"), forState: .Normal)
        button.frame = CGRectMake(25253530// X, Y, width, height
        button.addTarget(self, action: "buttonPressed:", forControlEvents: .TouchUpInside)
        button.backgroundColor = UIColor(red: (31/255.0), green: (146/255.0), blue: (160/255.0), alpha: 1.0)
        
        button.layer.cornerRadius = 5
        button.layer.masksToBounds = true
        
        self.view.addSubview(button)
}
cs


댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday