首页开始训练按钮

- (void)StartTrainClick:(UIButton *)sender{

if (self.WorkoutModel.restContent && [self.WorkoutModel.clickStatus isEqualToString:@"0"]) {

UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"提示"message:@"休息时间,不能进行训练计划"delegate:self cancelButtonTitle:@"确定"otherButtonTitles:nil, nil];

[alert show];

return;

}else if (self.WorkoutModel.resContent || self.WorkoutModel.aerContent || ![self.WorkoutModel.clickStatus isEqualToString:@"0"]) {

MTTodaysPlanVC *todayPlanVC = [[MTTodaysPlanVC alloc] init];

[self.navigationController pushViewController:todayPlanVC animated:YES];

}else{

UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"提示"message:@"无锻炼计划,无法开始训练"delegate:self cancelButtonTitle:@"确定"otherButtonTitles:nil, nil];

[alert show];

return;

}

}

你可能感兴趣的:(首页开始训练按钮)