取消某個(gè)頁面的側(cè)滑返回頁面
直接自定義設(shè)置返回按鈕就好了,不要用默認(rèn)的返回按鈕。
//btn_back
self.navigationItem.leftBarButtonItem= [[UIBarButtonItemalloc]initWithImage:[UIImageimageNamed:@"btn_back"]style:UIBarButtonItemStylePlaintarget:selfaction:@selector(showMessage)];
//返回提示信息
-(void)showMessage{
[UIAlertViewalertWithCallBackBlock:^(NSIntegerbuttonIndex) {
if(buttonIndex ==1) {
[self.navigationControllerpopViewControllerAnimated:YES];
}
}title:@"提示"message:@"確定要放棄本次發(fā)布嗎"cancelButtonName:@"取消"otherButtonTitles:@"確定",nil];
}