티스토리 뷰

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@IBOutlet weak var testView: UIView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        self.animationStart()
    }
    
    func animationStart(){
        //Transform 다중 적용
        var t = CGAffineTransformIdentity
        t = CGAffineTransformTranslate(t, CGFloat(100), CGFloat(300))
        t = CGAffineTransformRotate(t, CGFloat(M_PI_4))
        t = CGAffineTransformScale(t, CGFloat(-1), CGFloat(2))
        
        UIView.animateWithDuration(0.5) {
            self.testView.transform = t
        }
    }
cs


댓글
댓글쓰기 폼