2017年4月26日
一.頁面跳轉(zhuǎn)正確使用彈框
1.如果是push頁面的,一定要在頁面加載好后,在使用彈框。
if (_examType == HuExamTypeExam) {
//先push頁面,在添加彈框
[weakSelf enterTestResultPage:resExerciseModel];
if (isTimeOut) {
[MBProgressHUD showMessageInCurrentWindow:@"考試開始后超過考試時長,自動結(jié)束考試"];
}
}
不然就會一直不消失(不是必現(xiàn),偶爾也有正常的)。
Paste_Image.png
或者可以用如下方法,添加頁面前先用彈框顯示,點擊確定后在添加頁面
- (void)showAlertMore {
NSString *msg = [NSString stringWithFormat:@"您已退出界面%ld次,已經(jīng)自動交卷啦",_leaveTimes];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:msg preferredStyle:UIAlertControllerStyleAlert];
WS(weakSelf);
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"知道了" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
weakSelf.blackView.hidden = true;
[weakSelf.navigationController setNavigationBarHidden:false];
[weakSelf uploadPaper:NO];//大于n次 自動提交答案
}];
[alertController addAction:cancelAction];
[self presentViewController:alertController animated:YES completion:nil];
}
2.如果是pop頁面可以先 彈框, 在pop頁面
{
// 提示 在跳轉(zhuǎn)到詳情即可
NSString *message = [NSString stringWithFormat:@"全部%@題,正確%@題",resExerciseModel.total,resExerciseModel.successCount];
[MBProgressHUD showMessageInCurrentWindow:message];
[HuConfigration curVc:weakSelf backToSpecialVCClass:kTrainingDetailViewController first:YES];
}
2017年4月10日
1.使用
[MBProgressHUD showMessage:@"請輸入姓名"];
[MBProgressHUD showMessageInCurrentWindow:message];
如果您發(fā)現(xiàn)本文對你有所幫助,如果您認為其他人也可能受益,請把它分享出去。