AS_SignUpC.m 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. //
  2. // AS_SignUpC.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2023/5/17.
  6. //
  7. #import "AS_SignUpC.h"
  8. #import "LoginSignUpV.h"
  9. @interface AS_SignUpC () <UIScrollViewDelegate>
  10. @property (nonatomic, strong) UIScrollView *scrollview;
  11. @property (nonatomic, strong) LoginSignUpV *xxx_signUpV;
  12. @end
  13. @implementation AS_SignUpC
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. // Do any additional setup after loading the view.
  17. self.customNavBar.hidden = YES;
  18. self.navigationController.navigationBar.hidden = YES;
  19. [self sub_veiwTapBlock];
  20. }
  21. - (void)initSubviews{
  22. [super initSubviews];
  23. [self.view addSubview:self.scrollview];
  24. UIView *logNav = [self logNavView];
  25. [self.scrollview addSubview:logNav];
  26. UIImageView *Hi_imgV = [[UIImageView alloc]init];
  27. UIImage *hiImg = [UIImage imageNamed:@"login_signup"];
  28. Hi_imgV.image = hiImg;
  29. [self.scrollview addSubview:Hi_imgV];
  30. [self.scrollview addSubview:self.xxx_signUpV];
  31. Hi_imgV.frame = CGRectMake(20, CGRectGetMaxY(logNav.frame)+30, KScreenWidth-40, hiImg.size.height/hiImg.size.width*(KScreenWidth-40));
  32. self.xxx_signUpV.frame = CGRectMake(0, CGRectGetMaxY(Hi_imgV.frame)+30, KScreenWidth, 500);
  33. [self.xxx_signUpV sizeToFit];
  34. NSLog(@"------%@",self.xxx_signUpV);
  35. }
  36. - (void)sub_veiwTapBlock{
  37. @weakify(self)
  38. self.xxx_signUpV.ViewtapClose = ^(NSInteger num, id _Nonnull data) {
  39. @strongify(self)
  40. [self reqNet_singup:(NSDictionary *)data];
  41. };
  42. }
  43. //wm_todo 注册请求
  44. -(void)reqNet_singup:(NSDictionary *)dic{
  45. }
  46. -(void)handle_closeEvent:(UIButton *)btn{
  47. [self.navigationController popViewControllerAnimated:YES];
  48. }
  49. - (UIScrollView *)scrollview {
  50. if (!_scrollview) {
  51. _scrollview = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
  52. }
  53. return _scrollview;
  54. }
  55. -(UIView *)logNavView{
  56. IPhoneXHeigh
  57. UIView *topView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, securitytop_Y)];
  58. UIButton *closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  59. [closeBtn setImage:[UIImage imageNamed:@"common_close"] forState:UIControlStateNormal];
  60. [closeBtn addTarget:self action:@selector(handle_closeEvent:) forControlEvents:UIControlEventTouchUpInside];
  61. closeBtn.frame = CGRectMake(20, 44, 44, 44);
  62. [topView addSubview:closeBtn];
  63. UIImageView *headImg = [[UIImageView alloc]init];
  64. UIImage *bannerImg = [UIImage imageNamed:@"common_headLogo"];
  65. headImg.image = bannerImg ;
  66. headImg.frame = CGRectMake((KScreenWidth- bannerImg.size.width)/2, 20 , bannerImg.size.width, bannerImg.size.height);
  67. [topView addSubview:headImg];
  68. closeBtn.centerY = topView.centerY;
  69. headImg.centerY = topView.centerY;
  70. return topView;
  71. }
  72. - (LoginSignUpV *)xxx_signUpV {
  73. if (!_xxx_signUpV) {
  74. _xxx_signUpV = [[LoginSignUpV alloc] init];
  75. }
  76. return _xxx_signUpV;
  77. }
  78. @end