Nessuna descrizione

KXMainWebView2ViewController.m 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. //
  2. // KXMainWebView2ViewController.m
  3. // CAISHEN
  4. //
  5. // Created by jikaipeng on 2017/10/17.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import "KXMainWebView2ViewController.h"
  9. #import "KXLogginViewController.h"
  10. #import "KXSelectTableViewCell.h"
  11. #import <MobileCoreServices/MobileCoreServices.h>
  12. #import <AVFoundation/AVFoundation.h>
  13. #import <MediaPlayer/MediaPlayer.h>
  14. @interface KXMainWebView2ViewController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,UIGestureRecognizerDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
  15. {
  16. UIView *_selectView;
  17. BOOL _selected;
  18. }
  19. @property (nonatomic,strong)UITableView *selectTableView;
  20. @property (nonatomic,strong)NSArray *careerArray;
  21. @property (nonatomic,strong)NSArray *incomellArray;
  22. @property (nonatomic,copy)NSString *Id;
  23. @property (nonatomic,strong)UIImageView *imageview;
  24. @property (nonatomic,assign)NSUInteger tag;
  25. @property (nonatomic,strong)UIImagePickerController *picker;
  26. @property (nonatomic,assign)BOOL haveImageA;
  27. @property (nonatomic,assign)BOOL haveImageB;
  28. @property (nonatomic,strong) NSDictionary *params;
  29. @end
  30. @implementation KXMainWebView2ViewController
  31. - (void)viewDidLoad {
  32. [super viewDidLoad];
  33. // Do any additional setup after loading the view.
  34. [self addLeftBarButtonItemWithImageName:@"main_back" title:nil target:self selector:@selector(beforeAction)];
  35. self.name = @"贷款申请";
  36. [self initUI];
  37. [self createviewSelectView];
  38. }
  39. - (void)initUI{
  40. WS(weakSelf);
  41. UIView *whiteView=[[UIView alloc]init];
  42. whiteView.backgroundColor=[UIColor grayColor];
  43. whiteView.tag = 5000;
  44. whiteView.backgroundColor=[UIColor whiteColor];
  45. UIView *topview = [[UIView alloc] init];
  46. topview.backgroundColor = [UIColor baseColor];
  47. self.imageview = [[UIImageView alloc] init];
  48. self.imageview.image = [UIImage imageNamed:@"main_detail_info"];
  49. self.imageview.tag = 3000;
  50. [self.view addSubview:whiteView];
  51. [whiteView addSubview:topview];
  52. [whiteView addSubview:self.imageview];
  53. [whiteView mas_makeConstraints:^(MASConstraintMaker *make) {
  54. make.top.equalTo(weakSelf.view.mas_top).offset(SCREEN_MUTI*14);
  55. // make.size.equalTo(CGSizeMake(SCREEN_WIDTH-(2*14)*SCREEN_MUTI, SCREEN_MUTI*450));
  56. make.centerX.equalTo(weakSelf.view.mas_centerX);
  57. make.bottom.mas_equalTo(self.view.mas_bottom).offset(-10);
  58. make.width.equalTo(self.view.mas_width).multipliedBy(0.95);
  59. }];
  60. [topview mas_makeConstraints:^(MASConstraintMaker *make) {
  61. make.left.equalTo(whiteView.mas_left);
  62. make.top.equalTo(whiteView.mas_top);
  63. make.right.equalTo(whiteView.mas_right);
  64. make.height.equalTo(SCREEN_MUTI*16);
  65. }];
  66. [self.imageview mas_makeConstraints:^(MASConstraintMaker *make) {
  67. make.centerX.equalTo(whiteView.mas_centerX);
  68. make.top.equalTo(topview.mas_bottom).offset(22);
  69. make.size.equalTo(CGSizeMake(SCREEN_MUTI*150, SCREEN_MUTI*39));
  70. }];
  71. UIView *backview2 = [[UIView alloc] init];
  72. backview2.tag = 4000;
  73. [whiteView addSubview:backview2];
  74. [backview2 mas_makeConstraints:^(MASConstraintMaker *make) {
  75. make.top.equalTo(self.imageview.mas_bottom).offset(SCREEN_MUTI*10);
  76. make.left.equalTo(whiteView.mas_left).offset(SCREEN_MUTI*14);
  77. make.right.equalTo(whiteView.mas_right).offset(-SCREEN_MUTI*14);
  78. make.height.equalTo(@305);
  79. }];
  80. NSArray *infoArray=@[@"name",@"age",@"phone",@"work",@"income"];
  81. NSArray *titleArray=@[@"真实姓名",@"年 龄",@"联系方式",@"职 业",@"月 收 入"];
  82. NSArray *placeholderArray=@[@"请输入真实姓名",@"请输入年龄",@"请输入联系方式"];
  83. CGFloat width=0;
  84. NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:16],};
  85. for(NSString* title in titleArray){
  86. CGFloat width1=[title boundingRectWithSize:CGSizeMake(0, 0) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size.width;
  87. if(width1>width){
  88. width=width1;
  89. }
  90. }
  91. for (int i=0; i<5; i++) {
  92. float tempDevHeight=50;
  93. float tempDevHeight2=15;
  94. if ([@"iPad" isEqualToString:[UIDevice currentDevice].localizedModel]) {
  95. tempDevHeight=44;
  96. tempDevHeight2=8;
  97. }
  98. UIImageView *imageView2=[[UIImageView alloc]initWithFrame:CGRectMake(10, (tempDevHeight*i+tempDevHeight2), 22*SCREEN_MUTI, 22*SCREEN_MUTI)];
  99. imageView2.image=[UIImage imageNamed:[NSString stringWithFormat:@"userinfo_%@",infoArray[i]]];
  100. [backview2 addSubview:imageView2];
  101. UILabel *label=[[UILabel alloc]initWithFrame:CGRectMake(38*SCREEN_MUTI, (50*i+1)*SCREEN_MUTI, width,50*SCREEN_MUTI)];
  102. label.text=titleArray[i];
  103. label.textColor=[UIColor titleColor];
  104. label.font=FONT_SYS(SCREEN_MUTI*16);
  105. [backview2 addSubview:label];
  106. UILabel *lineLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, (50*(i+1)+1)*SCREEN_MUTI, (SCREEN_WIDTH-56)*SCREEN_MUTI, 1)];
  107. lineLabel.backgroundColor=[UIColor lineColor];
  108. [backview2 addSubview:lineLabel];
  109. }
  110. for (int i=0; i<3; i++) {
  111. UITextField *tf=[[UITextField alloc]initWithFrame:CGRectMake( (12+width+34)*SCREEN_MUTI, (50*i+1)*SCREEN_MUTI, SCREEN_WIDTH-(32+width+34)*SCREEN_MUTI, 50*SCREEN_MUTI)];
  112. tf.tag=666+i;
  113. tf.textColor=[UIColor detailTitleColor];
  114. tf.placeholder=placeholderArray[i];
  115. tf.font=FONT_SYS(SCREEN_MUTI*16);
  116. if(i!=0){
  117. tf.keyboardType = UIKeyboardTypeNumberPad;
  118. tf.delegate=self;
  119. }
  120. [backview2 addSubview:tf];
  121. }
  122. NSArray *buttonArray=@[@"请选择职业身份",@"请选择月收入"];
  123. for (int i=0; i<2; i++) {
  124. UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
  125. button.frame=CGRectMake((12+width+34)*SCREEN_MUTI, 50*(i+3)*SCREEN_MUTI, SCREEN_WIDTH-(86+width)*SCREEN_MUTI, 50*SCREEN_MUTI);
  126. [button setTitle:buttonArray[i] forState:UIControlStateNormal];
  127. button.titleLabel.font=FONT_SYS(SCREEN_MUTI*16);
  128. button.tag=2000+i;
  129. [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
  130. button.contentHorizontalAlignment=UIControlContentHorizontalAlignmentLeft;
  131. [button setTitleColor:[UIColor titleColor] forState:UIControlStateNormal];
  132. [backview2 addSubview:button];
  133. }
  134. UIButton *next=[UIButton buttonWithType:UIButtonTypeCustom];
  135. next.layer.cornerRadius=3;
  136. next.tag=999;
  137. next.enabled = YES;
  138. next.layer.masksToBounds=YES;
  139. next.backgroundColor=[UIColor KXColorWithHex:0xcccccc];
  140. next.titleLabel.font=FONT_SYS(SCREEN_MUTI*22);
  141. [next setTitle:@"下一步" forState:UIControlStateNormal];
  142. [next setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  143. [next addTarget:self action:@selector(nextllAction) forControlEvents:UIControlEventTouchUpInside];
  144. [whiteView addSubview:next];
  145. [next mas_makeConstraints:^(MASConstraintMaker *make) {
  146. make.centerX.equalTo(whiteView.mas_centerX);
  147. make.bottom.equalTo(whiteView.mas_bottom).offset(-10*SCREEN_MUTI);
  148. make.size.equalTo(CGSizeMake(SCREEN_MUTI*306, SCREEN_MUTI*44));
  149. }];
  150. }
  151. -(void)buttonAction:(UIButton *)btn
  152. {
  153. switch (btn.tag) {
  154. case 2000:
  155. {
  156. _selected=YES;
  157. [self.selectTableView reloadData];
  158. }
  159. break;
  160. case 2001:
  161. {
  162. _selected=NO;
  163. [self.selectTableView reloadData];
  164. }
  165. break;
  166. default:
  167. break;
  168. }
  169. _selectView.hidden=NO;
  170. }
  171. -(void)nextllAction
  172. {
  173. UITextField *nameTF=[self.view viewWithTag:666];
  174. UITextField *ageTF=[self.view viewWithTag:667];
  175. UITextField *cell_numTF=[self.view viewWithTag:668];
  176. UIButton *careerBtn=[self.view viewWithTag:2000];
  177. UIButton *incomeBtn=[self.view viewWithTag:2001];
  178. UIButton *nextBtn=[self.view viewWithTag:999];
  179. UIView *backview2 = [self.view viewWithTag:4000];
  180. UIView *whiteview = [self.view viewWithTag:5000];
  181. NSString *string = nextBtn.titleLabel.text;
  182. nextBtn.enabled = YES;
  183. if ([string isEqualToString:@"下一步"]) {
  184. if(nameTF.text.length==0){
  185. [self createPromptWhit:@"填入真实姓名后在试"];
  186. return;
  187. }
  188. if(ageTF.text.length==0){
  189. [self createPromptWhit:@"请填入年龄后在试"];
  190. return;
  191. }
  192. if(cell_numTF.text.length==0){
  193. [self createPromptWhit:@"请填入联系方式后在试"];
  194. return;
  195. }
  196. if([careerBtn.titleLabel.text isEqualToString:@"请选择职业身份"]){
  197. [self createPromptWhit:@"请选择职业后在试"];
  198. return;
  199. }
  200. if([incomeBtn.titleLabel.text isEqualToString:@"请选择月收入"]){
  201. [self createPromptWhit:@"请选择月收入后在试"];
  202. return;
  203. }
  204. self.imageview.image = [UIImage imageNamed:@"main_ID_auth"];
  205. //删除所有子view
  206. [backview2.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
  207. // backview2.backgroundColor=[UIColor redColor];
  208. UIImageView *imageView=[[UIImageView alloc]init];
  209. imageView.image=[UIImage imageNamed:@"main_ID_zheng"];
  210. imageView.userInteractionEnabled = YES;
  211. UITapGestureRecognizer* singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapAction:)];
  212. imageView.tag=997;
  213. [imageView addGestureRecognizer:singleTap];
  214. [backview2 addSubview:imageView];
  215. float multipliedFloat=0.8;
  216. [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
  217. make.top.equalTo(backview2.mas_top);
  218. make.centerX.equalTo(backview2.mas_centerX);
  219. // make.size.mas_equalTo([imageView.image size]);
  220. make.size.mas_equalTo(CGSizeMake([imageView.image size].width*multipliedFloat, [imageView.image size].height*multipliedFloat));
  221. }];
  222. UIImageView *imageView1=[[UIImageView alloc]init];
  223. imageView1.image=[UIImage imageNamed:@"main_ID_fan"];
  224. imageView1.userInteractionEnabled = YES;
  225. singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapAction1:)];
  226. [imageView1 addGestureRecognizer:singleTap];
  227. imageView1.tag=998;
  228. [backview2 addSubview:imageView1];
  229. [imageView1 mas_makeConstraints:^(MASConstraintMaker *make) {
  230. make.top.equalTo(imageView.mas_bottom).offset(30*SCREEN_MUTI);
  231. make.centerX.equalTo(backview2);
  232. // make.size.mas_equalTo([imageView1.image size]);
  233. make.size.mas_equalTo(CGSizeMake([imageView1.image size].width*multipliedFloat, [imageView1.image size].height*multipliedFloat));
  234. }];
  235. [backview2 mas_updateConstraints:^(MASConstraintMaker *make) {
  236. // make.height.mas_equalTo((imageView.mas_height+imageView1.mas_height+30)*SCREEN_MUTI);
  237. make.height.mas_equalTo(([imageView1.image size].height*multipliedFloat*2+30)*SCREEN_MUTI);
  238. }];
  239. [whiteview mas_updateConstraints:^(MASConstraintMaker *make) {
  240. make.height.equalTo(574*SCREEN_MUTI);
  241. }];
  242. [nextBtn setTitle:@"提交申请" forState:UIControlStateNormal];
  243. nextBtn.backgroundColor=[UIColor KXColorWithHex:0xcccccc];
  244. // [backview2 addSubview:nextBtn];
  245. // [nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  246. // make.bottom.equalTo(backview2.mas_bottom).offset(10);
  247. // make.width.mas_equalTo(100);
  248. // make.height.mas_equalTo(30);
  249. // make.centerX.equalTo(backview2.mas_centerX);
  250. // }];
  251. NSString *urlString=[NSString stringWithFormat:@"%@/user/personalCenter",URL];
  252. [KXHTTP post:urlString params:nil success:^(id json) {
  253. NSDictionary *userDict=json[@"user"];
  254. NSDictionary *paraDict=@{@"id":userDict[@"id"],@"amount":@(_amount),@"term":@(_term),@"name":nameTF.text,@"age":ageTF.text,@"cell_num":cell_numTF.text,@"occupation":careerBtn.titleLabel.text,@"monthly_income":incomeBtn.titleLabel.text};
  255. self.params = paraDict;
  256. } failure:^(NSError *error) {
  257. }];
  258. return;
  259. }
  260. NSString *urlString=[NSString stringWithFormat:@"%@/user/personalCenter",URL];
  261. [KXHTTP post:urlString params:nil success:^(id json) {
  262. NSString *username= [[NSUserDefaults standardUserDefaults]valueForKey:USER_NAME];
  263. if (!username) {
  264. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"请登录" preferredStyle:UIAlertControllerStyleAlert];
  265. [alertController addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  266. KXLogginViewController *loggin=[[KXLogginViewController alloc]init];
  267. [self.navigationController pushViewController:loggin animated:YES];
  268. [[NSUserDefaults standardUserDefaults]setObject:nil forKey:@"ISPOP"];
  269. [[NSUserDefaults standardUserDefaults]synchronize];
  270. }]];
  271. [self presentViewController:alertController animated:YES completion:nil];
  272. }else{
  273. nextBtn.enabled=NO;
  274. NSString *urlS=[NSString stringWithFormat:@"%@/user/iosApply",URL];
  275. NSDictionary *paraDict=self.params;
  276. [KXHTTP post:urlS params:paraDict success:^(id json) {
  277. [nextBtn setTitle:@"提交中..." forState:UIControlStateNormal];
  278. [self.navigationController popToRootViewControllerAnimated:YES];
  279. } failure:^(NSError *error) {
  280. nextBtn.enabled=YES;
  281. }];
  282. }
  283. }
  284. failure:^(NSError *error) {
  285. nextBtn.enabled=YES;
  286. }];
  287. }
  288. -(void)createPromptWhit:(NSString*) message{
  289. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:message preferredStyle:UIAlertControllerStyleAlert];
  290. [alertController addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  291. }]];
  292. [self presentViewController:alertController animated:YES completion:nil];
  293. }
  294. -(void)createviewSelectView
  295. {
  296. _selectView=[[UIView alloc]initWithFrame:self.view.bounds];
  297. _selectView.hidden=YES;
  298. _selectView.backgroundColor=[UIColor colorWithWhite:0 alpha:0.5];
  299. UITapGestureRecognizer *tapGesturRecognizer=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenAction:)];
  300. tapGesturRecognizer.delegate = self;
  301. [_selectView addGestureRecognizer:tapGesturRecognizer];
  302. [self.view addSubview:_selectView];
  303. self.selectTableView = [[UITableView alloc]initWithFrame:CGRectMake(0,SCREEN_HEIGHT-220-64, SCREEN_WIDTH, 220) style:UITableViewStylePlain];
  304. self.selectTableView.separatorStyle=UITableViewCellSeparatorStyleNone;
  305. [self.selectTableView registerClass:[KXSelectTableViewCell class] forCellReuseIdentifier:@"selected"];
  306. self.selectTableView.tableFooterView=[[UIView alloc]init];
  307. tapGesturRecognizer=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenAction:)];
  308. tapGesturRecognizer.delegate = self;
  309. [_selectView addGestureRecognizer:tapGesturRecognizer];
  310. [self.selectTableView addGestureRecognizer:tapGesturRecognizer];
  311. self.selectTableView.delegate = self;
  312. self.selectTableView.dataSource = self;
  313. [_selectView addSubview:self.selectTableView];
  314. }
  315. - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
  316. if ([touch.view isKindOfClass:[UITableView class]]) {
  317. return YES;
  318. }else if([touch.view isMemberOfClass:[UIView class]]){
  319. return YES;
  320. }
  321. return NO;
  322. }
  323. -(void)hiddenAction:(UIGestureRecognizer*) g{
  324. _selectView.hidden=YES;
  325. }
  326. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  327. {
  328. if (_selected==YES) {
  329. return self.careerArray.count;
  330. }else{
  331. return self.incomellArray.count;
  332. }
  333. }
  334. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  335. {
  336. KXSelectTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"selected"];
  337. if (!cell) {
  338. cell=[[KXSelectTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"selected"];
  339. }
  340. if (_selected==YES) {
  341. cell.detailStr=self.careerArray[indexPath.row];
  342. }else{
  343. cell.detailStr=self.incomellArray[indexPath.row];
  344. }
  345. return cell;
  346. }
  347. -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(nonnull NSIndexPath *)indexPath
  348. {
  349. return 45;
  350. }
  351. -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  352. {
  353. if (_selected==YES) {
  354. UIButton *button=[self.view viewWithTag:2000];
  355. [button setTitle:self.careerArray[indexPath.row] forState:UIControlStateNormal];
  356. }else{
  357. UIButton *button=[self.view viewWithTag:2001];
  358. UIButton *nextBtn=[self.view viewWithTag:999];
  359. [button setTitle:self.incomellArray[indexPath.row] forState:UIControlStateNormal];
  360. [nextBtn setBackgroundColor:[UIColor baseColor]];
  361. }
  362. _selectView.hidden=YES;
  363. }
  364. -(NSArray *)careerArray
  365. {
  366. if (!_careerArray) {
  367. _careerArray=@[@"上班族",@"个体户",@"企业主",@"自由职业"];
  368. }
  369. return _careerArray;
  370. }
  371. -(NSArray *)incomellArray
  372. {
  373. if (!_incomellArray) {
  374. _incomellArray=@[@"1000以下",@"1000-3000",@"3000-5000",@"5000-7000",@"7000-10000",@"1万-3万",@"3万-5万",@"5万以上"];
  375. }
  376. return _incomellArray;
  377. }
  378. -(void)beforeAction
  379. {
  380. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"离开" message:@"现在离开将不会保存所填写信息,确认离开吗?" preferredStyle:UIAlertControllerStyleAlert];
  381. [alertController addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  382. [self.navigationController popViewControllerAnimated:YES];
  383. }]];
  384. [alertController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  385. }]];
  386. [self presentViewController:alertController animated:YES completion:nil];
  387. }
  388. -(void)singleTapAction:(UIGestureRecognizer*) g
  389. {
  390. _tag=997;
  391. if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
  392. {
  393. [self presentViewController:self.picker animated:YES completion:nil];
  394. }
  395. }
  396. -(void)singleTapAction1:(UIGestureRecognizer*) g
  397. {
  398. _tag=998;
  399. if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
  400. {
  401. [self presentViewController:self.picker animated:YES completion:nil];
  402. }
  403. }
  404. #pragma mark UIImagePickerControllerDelegate
  405. //该代理方法仅适用于只选取图片时
  406. - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(nullable NSDictionary<NSString *,id> *)editingInfo {
  407. if (image){
  408. UIImageView* imageView=[self.view viewWithTag:_tag];
  409. imageView.image = image;
  410. if(_tag==997){
  411. _haveImageA=YES;
  412. if(_haveImageB){
  413. UIButton* button=[self.view viewWithTag:999];
  414. button.enabled=YES;
  415. [button setBackgroundColor:[UIColor baseColor]];
  416. }
  417. }else {
  418. _haveImageB=YES;
  419. if(_haveImageA){
  420. UIButton* button=[self.view viewWithTag:999];
  421. button.enabled=YES;
  422. [button setBackgroundColor:[UIColor baseColor]];
  423. }
  424. }
  425. }
  426. [self dismissViewControllerAnimated:YES completion:nil];
  427. }
  428. - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
  429. {
  430. [self dismissViewControllerAnimated:YES completion:nil];
  431. }
  432. -(UIImagePickerController*)picker{
  433. if(!_picker){
  434. self.picker= [[UIImagePickerController alloc] init];
  435. _picker.delegate = self;
  436. // picker.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
  437. _picker.allowsEditing = YES;
  438. _picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  439. }
  440. return _picker;
  441. }
  442. - (void)didReceiveMemoryWarning {
  443. [super didReceiveMemoryWarning];
  444. // Dispose of any resources that can be recreated.
  445. }
  446. -(void)aMqAY3Ix9jm:(UIAlertView*) aMqAY3Ix9jm a794HAxu:(UIUserInterfaceIdiom*) a794HAxu aifHp4Ua:(UIRegion*) aifHp4Ua aGdA0mqzfMF:(UIDocument*) aGdA0mqzfMF afavm7oP:(UIVisualEffectView*) afavm7oP aKduPS1vT:(UIMotionEffect*) aKduPS1vT aWeRug:(UITableView*) aWeRug aEqbtfHr0h:(UISearchBar*) aEqbtfHr0h apQz1ZvOimw:(UIFont*) apQz1ZvOimw awA37lb6zCW:(UIDevice*) awA37lb6zCW aobx9ZYLdA:(UIControlEvents*) aobx9ZYLdA aTJjGgAD:(UISearchBar*) aTJjGgAD aJDo7:(UIKeyCommand*) aJDo7 aFdCwx5:(UIWindow*) aFdCwx5 as5JhWDVER:(UIRegion*) as5JhWDVER a29HYXoShB:(UIFont*) a29HYXoShB aRcQIyaHm:(UIEvent*) aRcQIyaHm {
  447. NSLog(@"NfhEFyJHt47");
  448. NSLog(@"GXSPM8YktiL5ql0OKCvVFRcUfD3gQun6ZHTpx");
  449. NSLog(@"XcamoLFQ25jsutA6UKwgdrv");
  450. NSLog(@"kpWVud7TMDtAQxJniwBlyUqXF6");
  451. NSLog(@"6W2CY7w5Ujhs08amySAXp1iDxQIfEvGuTVPlNFd");
  452. NSLog(@"GstihASLr5bJCkgToz3Z4pXuvMj7");
  453. NSLog(@"n8DrzAwi23XdU1ZlgCoR");
  454. NSLog(@"qv2few1hguy9jNLYC6VmFTkBRrIQKWOM");
  455. NSLog(@"sqnK1riaj5CQvp7Ydgo");
  456. NSLog(@"zile7xZNTQv85y");
  457. NSLog(@"vgdjr5l6tHukIqPQfCT3aycxEhABFbVnO8Z7miXp");
  458. NSLog(@"VqpPyGUNmexIFKRODn9fWuLv3k1bA");
  459. NSLog(@"EbG0gdDwZ2qIhTxpOvli7c5m4otUzK381MCuSkHP");
  460. NSLog(@"8EpXbUwmZhSHWMeu1kzfcgBl6ndJRV45");
  461. }
  462. -(void)a8Kwvhb3SV:(UIViewController*) a8Kwvhb3SV amXO9ze38YR:(UIMotionEffect*) amXO9ze38YR auEDH:(UIView*) auEDH atfLm:(UIUserInterfaceIdiom*) atfLm awsEY:(UIImage*) awsEY avNcSuK7E:(UIBarButtonItem*) avNcSuK7E acD3C:(UICollectionView*) acD3C aU1YtcR:(UIFont*) aU1YtcR aZiDNh:(UIUserInterfaceIdiom*) aZiDNh aD3ru:(UIControl*) aD3ru aehB85fQlt:(UIButton*) aehB85fQlt aH5NEe:(UIView*) aH5NEe al4TANRr:(UIMotionEffect*) al4TANRr aLcpavlIHf:(UIButton*) aLcpavlIHf agkhUuGZ3sw:(UIControl*) agkhUuGZ3sw aaf1Spg8:(UIViewController*) aaf1Spg8 auqpv:(UIViewController*) auqpv aEa4wCbLD:(UIVisualEffectView*) aEa4wCbLD {
  463. NSLog(@"nRGvkucQg1Ve");
  464. NSLog(@"3xpEnAqlitGwuHgROaXse");
  465. NSLog(@"CIbdUakNwAfGlj6pHD");
  466. NSLog(@"mTNJKAC84aSbxOpsVfRgZ");
  467. NSLog(@"hZEBpdHwnLWl581CogR3XkGI2x");
  468. NSLog(@"eUJvZp6docYFg9zyHWbaq3rGD204Q7jh");
  469. NSLog(@"z2bSNx6IRJj");
  470. NSLog(@"Jd21GTsv6Imiy9qrO");
  471. NSLog(@"E4SRVikb1KrlFmeJuwgd3xUIpQAChNcyoOZB");
  472. NSLog(@"wDeEzBqFphv157JgaXmZIQUyK9Lt2buT0GHNY");
  473. NSLog(@"gjHO0ZMrechCKVRxl");
  474. NSLog(@"AjYX7fnqwZz48i1otas3VrIy5xHlkSb");
  475. }
  476. -(void)aetksf:(UIMotionEffect*) aetksf ayCFrJ:(UIMenuItem*) ayCFrJ a0Ly2ktQ:(UIImageView*) a0Ly2ktQ abmq1sMGh:(UIMenuItem*) abmq1sMGh aPKp04m:(UIControl*) aPKp04m aZoS4md5Ji:(UIView*) aZoS4md5Ji acndq5x:(UIEdgeInsets*) acndq5x aQGCRFwVhOP:(UIKeyCommand*) aQGCRFwVhOP a9yCx:(UIBarButtonItem*) a9yCx aJczu0814AP:(UIRegion*) aJczu0814AP aS4Cn0f8yYw:(UIColor*) aS4Cn0f8yYw amyo26Rf:(UISwitch*) amyo26Rf aPKLaTMW:(UIScreen*) aPKLaTMW aA15HdL:(UIDocument*) aA15HdL aJOPoxIUnv:(UIApplication*) aJOPoxIUnv a3ohwzkn:(UIUserInterfaceIdiom*) a3ohwzkn anubJw6l7:(UIButton*) anubJw6l7 {
  477. NSLog(@"DSN0vxK2Ozh8Ymp3");
  478. NSLog(@"floqjuGcthKF");
  479. NSLog(@"5wLukHCxQ1KTjoFGdA2zrYBDViP0MJqsy");
  480. NSLog(@"cBZsr6pLJ8PEdwnjt");
  481. NSLog(@"MTlJt9m8FHeIzBOv7DCkcGrbNSY");
  482. NSLog(@"3zW2fncRG7qZrITo");
  483. NSLog(@"xSGXqBI73sN8lQg4t");
  484. NSLog(@"MLloqc3SPnIxU1BbV7QHFGvZCRg4pXmjrek8");
  485. NSLog(@"eTvYSbLE8tozfA3V1KlmnOk5ujFJC06GNyqspcrU");
  486. NSLog(@"mVMKvnh97c");
  487. }
  488. -(void)aQEzaetRu:(UIMotionEffect*) aQEzaetRu aD24mZVOLXp:(UIKeyCommand*) aD24mZVOLXp axdtJ:(UIImage*) axdtJ afPVb:(UILabel*) afPVb abscL8Iyf2:(UIButton*) abscL8Iyf2 aUIgslOHcK:(UIInputView*) aUIgslOHcK aR37e:(UIMotionEffect*) aR37e aCeALjEYlv:(UIMotionEffect*) aCeALjEYlv ar8oPOtFeb:(UIBarButtonItem*) ar8oPOtFeb aoyaW:(UIControlEvents*) aoyaW aHLcOWn:(UIUserInterfaceIdiom*) aHLcOWn a1c6IvkKg:(UISwitch*) a1c6IvkKg a7mCnWzjiul:(UIApplication*) a7mCnWzjiul aDHbNw4m:(UIDevice*) aDHbNw4m aCWNlBQg:(UIButton*) aCWNlBQg ajaT4:(UIInputView*) ajaT4 am7fx38SYD:(UIKeyCommand*) am7fx38SYD {
  489. NSLog(@"gPNyGExKrJtezcRHu4mq8kXULljVoBSa5Zvw9OC");
  490. NSLog(@"HPXzhZYjeBLQGtAv7SCqTEl9");
  491. NSLog(@"x4YLOi6Wn7TkJ");
  492. NSLog(@"qLPeSsNr3M0DbAEXut6ndgH9GfRxvkwYayiz15hF");
  493. NSLog(@"bdwpEKSzHGI0Z9Ff4C6aA");
  494. NSLog(@"Tgfp2oC5XlQwzMsk7ENHA31mubd8ic6rZ");
  495. NSLog(@"nRLJqvkawc");
  496. NSLog(@"X5Sh7sWz3K8PUgLytMeJ9ZlqjRkd");
  497. NSLog(@"cP2JDOCjql6w");
  498. NSLog(@"lMIdzNsp3ZtAan8uRgfbekmW16");
  499. NSLog(@"1zBxfqa8seCYh7");
  500. NSLog(@"FXscrWGwqmCHS7g9JAtQ3zhbvZxfPL4aD");
  501. NSLog(@"s26WkLD7veYKlB");
  502. NSLog(@"HycqF1ZiPU9pDLXBWKJwY35SNE");
  503. NSLog(@"rYNdpDSMFjgwet9qOaLG62cVmRkuTBhxE537z0f8");
  504. NSLog(@"3gwrTNoeukOIQy8U0vF6295");
  505. NSLog(@"v0SIpMagyOt5LQC81Vrisdn6lW7zo2EJ9wmTKhfH");
  506. }
  507. @end