// // NYExaminationViewController.m // jiaPei // // Created by Ning.ge on 2024/10/14. // Copyright © 2024 JCZ. All rights reserved. // #import "NYExaminationViewController.h" @interface NYExaminationViewController () @property (weak, nonatomic) IBOutlet UIView *view01; @property (weak, nonatomic) IBOutlet UIButton *back_btn; @property (weak, nonatomic) IBOutlet UIImageView *top_imageView; @property (weak, nonatomic) IBOutlet UIView *content_view; @property (weak, nonatomic) IBOutlet UILabel *id_card_label; @property (weak, nonatomic) IBOutlet UILabel *username_label; @property (weak, nonatomic) IBOutlet UIButton *submit_btn; @end @implementation NYExaminationViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. NYExaminationViewModel *model = self.viewModel; self.top_imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"examination_km%d",model.km]]; self.id_card_label.text = RQ_USER_MANAGER.currentUser.loginCode; self.username_label.text = RQ_USER_MANAGER.currentUser.userName; self.content_view.layer.borderWidth = 1.0f; self.content_view.layer.borderColor = UIColorHex(0xD9D9D9).CGColor; self.submit_btn.layer.borderWidth = 1.0f; self.submit_btn.layer.borderColor = UIColorHex(0xA1A2A4).CGColor; [self enterLandscapeFullScreen:UIInterfaceOrientationLandscapeLeft animated:YES]; [self.view01 setNeedsLayout]; [self.view01 layoutIfNeeded]; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self.navigationController.navigationBar setHidden:YES]; } - (IBAction)submitActionClickdo:(UIButton *)sender { NYExaminationRoomViewModel *examinationroomViewModel = [[NYExaminationRoomViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{}]; [RQ_APPDELEGATE.services pushViewModel:examinationroomViewModel animated:YES]; } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ - (IBAction)backAtciondo:(id)sender { [self.navigationController.navigationBar setHidden:NO]; [self.navigationController popViewControllerAnimated:YES]; } - (void)enterLandscapeFullScreen:(UIInterfaceOrientation)orientation animated:(BOOL)animated { [[UIDevice currentDevice] setValue:[NSNumber numberWithInt:UIInterfaceOrientationUnknown] forKey:@"orientation"]; NSNumber *orientationUnknown = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft]; [[UIDevice currentDevice] setValue:orientationUnknown forKey:@"orientation"]; } //支持的方向 - (UIInterfaceOrientationMask)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscapeLeft|UIInterfaceOrientationMaskLandscapeRight; } - (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationPortrait; } @end