objective-c怎么代码触发按钮点击事件

大哥大姐们,打扰一下,objective-c怎么代码触发按钮点击事件
最新回答
朕就是萌萌哒

2024-05-09 07:00:16

看你想实现什么效果,最基本的用 pushViewController
MyViewController *myView = [[MyViewController alloc] init];
[self.navigationController pushViewController:myView animated:YES];

或者动画
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.4f]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationTransition:UIViewAnimationOptionTransitionNone forView:myView cache:YES];
[myView setCenter:CGPointMake(512, 384)];

[UIView commitAnimations];