-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if(motion==UIEventSubtypeMotionShake) { 代码A } } -(BOOL)canBecomeFirstResponder{ return YES; } -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self becomeFirstResponder]; } -(void)viewWillDisappear:(BOOL)animated { [self resignFirstResponder]; [super viewWillDisappear:animated]; }
鸿蒙传说
相关分类