IOS中添加按钮,点击按钮,直接退出程序
2016-05-27 本文已影响0人
一个城市猎人
IOS中添加按钮,点击按钮,直接退出程序
[ btn addTarget:self action:@selector(exitClick) forControlEvents: UIControlEventTouchUpInside];
//点击按钮,程序退出
- (void)exitClick
{
exit(0);
}
[ btn addTarget:self action:@selector(exitClick) forControlEvents: UIControlEventTouchUpInside];
//点击按钮,程序退出
- (void)exitClick
{
exit(0);
}