标签:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import UIKit class ViewController : UIViewController { override func viewDidLoad() { super .viewDidLoad() } //开始摇晃 override func motionBegan(motion: UIEventSubtype , withEvent event: UIEvent ) { println ( "开始摇晃" ) } //摇晃结束 override func motionEnded(motion: UIEventSubtype , withEvent event: UIEvent ) { println ( "摇晃结束" ) } //摇晃被意外终止 override func motionCancelled(motion: UIEventSubtype , withEvent event: UIEvent ) { println ( "摇晃被意外终止" ) } } |
标签:
原文地址:http://www.cnblogs.com/Free-Thinker/p/4843560.html