Demo Code
所有文档

          号码认证服务 PNVS

          Demo Code

          SAuthUICustomModel *model = [[SAuthUICustomModel alloc] init]; 
          model.currentVC = self;
          
            // 展现方式
          model.authViewShowStyle = SAuthLoginShowStypeFullScreen;
          //model.authViewShowStyle = SAuthLoginShowStypeAlert; //model.authViewShowStyle = SAuthLoginShowStypeSheet; //model.presentType = SAPresentationDirectionBottom;
          model.presentType = SAPresentationDirectionRight;
          // //
          //
          model.statusBarStyle = UIStatusBarStyleLightContent; //model.alertWidthScale = 0.8;
          //model.alertHeightScale = 0.6;
          
            // 导航栏
          //model.navIsHidden = YES;
          model.navColor = [UIColor greenColor];
          //model.navBackImage = [UIImage imageNamed:@"checkBox_selected.png"]; //NSMutableAttributedString *attString = [[NSMutableAttributedString
          alloc] initWithString:@"免密认证登录"];
          // [attString addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0, 5)];
          // [attString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:16] range:NSMakeRange(0, 5)];
          // model.navTitle = attString;
          
             // logo
          // model.logoIsHidden = NO;
          // model.logoImage = [UIImage imageNamed:@"logo.png"];
          // model.logoImageFrameBlock = ^CGRect(CGSize screenSize, CGSize containerViewSize) {
          // return CGRectMake(20, 280, containerViewSize.width/2, containerViewSize.height/4);
          // };
          ////
          //   // 电话号码
          // NSMutableAttributedString *attString1 = [[NSMutableAttributedString alloc] initWithString:@"15811289837"];
          //    [attString1 addAttribute:NSForegroundColorAttributeName value:[UIColor
          redColor] range:NSMakeRange(0, 11)];
          //    [attString1 addAttribute:NSFontAttributeName value:[UIFont
          systemFontOfSize:30] range:NSMakeRange(0, 11)];
          // model.phoneNumberText = attString1;
          // model.phoneNumberOffY = @(901); //
          //   // 登录按钮
          // NSMutableAttributedString *attString2 = [[NSMutableAttributedString alloc] initWithString:@"HaoMaoYiJianDengLu"];
          //    [attString2 addAttribute:NSForegroundColorAttributeName value:[UIColor
          blackColor] range:NSMakeRange(0, 6)];
          // UIFont *font1 = [UIFont fontWithName:@"Arial-BoldItalicMT" size:20.0];
          //    [attString2 addAttribute:NSFontAttributeName value:font1
          range:NSMakeRange(0, 6)];
          // model.loginBtnText = attString2; //
           
          //// model.loginBtnFrameBlock = ^CGRect(CGSize screenSize, CGSize containerViewSize) {
          //// return CGRectMake(400, 1360, 400, 100);
          //// };
          //
          // UIImage *c = [UIImage imageNamed:@"active.png"]; 
          // UIImage *d = [UIImage imageNamed:@"disable.png"]; 
          // UIImage *e = [UIImage imageNamed:@"highlight.png"]; 
          // model.loginBtnImgs =@[c, d, e];
          ////
          ////  // 授权协议
          // UIImage *a = [UIImage imageNamed:@"checkBox_unSelected.png"];
          // UIImage *b = [UIImage imageNamed:@"checkBox_selected.png"]; 
          // model.checkboxImgs =@[a, b];
          // model.checkboxSize = @(60);
          // 
          model.privacyFirst = @[@"百度协议", @"https://www.baidu.com"]; model.privacySecond = @[@"京东协议", @"https://www.jd.com"]; model.privacyThird = @[@"腾讯协议", @"https://www.qq.com"];
          model.privacySymbol = YES;
          // model.privacySymbol= YES
          // 
          // model.appPrivacyAlignment=NSTextAlignmentLeft;
          // model.privacyFrameBlock = ^CGRect(CGsize screenSize,CGSize containerViewSize){
          //return CGRectMake(418, 1460, containerViewSize.width, containerViewSize.height/4);
          //};
          //
          //   //服务
          //// model.slogonIsHidden = YES; //
          //   // web导航栏
          / model.webNavTitleAttrs = @{NSForegroundColorAttributeName: [UIColor redColor], NSFontAttributeName: [UIFont systemFontOfSize:25]};
          // model.webNavColor = [UIColor blueColor];
          // model.webNavReturnImg = [UIImage imageNamed:@"return.png"];
          //
          //   // 自定义视图
          // model.customViewBlock = ^(UIView * _Nonnull containerView) {
          //
          200, 50)];
          // xxx.backgroundColor = [UIColor grayColor];
          //        [containerView addSubview:xxx];
          //    };
          UIView *xxx = [[UIView alloc] initWithFrame:CGRectMake(100, 100,200, 50)];
          // xxx.backgroundColor = [UIColor grayColor];
          //        [containerView addSubview:xxx];
          //    };
              // 背景图片
          // model.authPageBackgroundImage = [UIImage imageNamed:@"disable.png"];;
          [SAuthLoginSDKLib authLoginWithCustomModel:model timeout:3 parameters:@"test" completion:^(NSString *resultString) {
          NSLog(@" complet auth login:%@", resultString); [SAuthLoginSDKLib closeLoginViewControllerWithCompletion:nil];
          }];
          上一篇
          登录返回数据说明
          下一篇
          相关协议