Commit 401b43bd653e1e60345c05fa10b01d48586c9f02

Authored by zhangxiaowen
1 parent b086d257

no message

CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateCodeController.h renamed to CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateQrCodeController.h
1 1 //
2   -// CNLiveGenerateCodeController.h
  2 +// CNLiveGenerateQrCodeController.h
3 3 // CNLiveQrCodeModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
... ... @@ -14,7 +14,8 @@
14 14  
15 15 NS_ASSUME_NONNULL_BEGIN
16 16  
17   -@interface CNLiveGenerateCodeController : UIViewController
  17 +@interface CNLiveGenerateQrCodeController : UIViewController
  18 +@property (nonatomic, copy) NSString *ID;
18 19  
19 20 @end
20 21  
... ...
CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateCodeController.m renamed to CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateQrCodeController.m
1 1 //
2   -// CNLiveGenerateCodeController.m
  2 +// CNLiveGenerateQrCodeController.m
3 3 // CNLiveQrCodeModule
4 4 //
5 5 // Created by 153993236@qq.com on 11/12/2019.
6 6 // Copyright (c) 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -#import "CNLiveGenerateCodeController.h"
  9 +#import "CNLiveGenerateQrCodeController.h"
10 10 #import <Photos/Photos.h>
11 11 #import <Accelerate/Accelerate.h>
12 12  
... ... @@ -18,17 +18,19 @@
18 18 #import "CNLiveGenerateCodeView.h"
19 19 #import "CNLiveScanQrCodeController.h"
20 20  
21   -@interface CNLiveGenerateCodeController ()<CNLiveQrCodeNavigationBarDelegate,QMUIAlertControllerDelegate>
  21 +@interface CNLiveGenerateQrCodeController ()<CNLiveQrCodeNavigationBarDelegate,QMUIAlertControllerDelegate>
22 22 @property (nonatomic, strong) CNLiveQrCodeNavigationBar *navigationBar;
23 23 @property (nonatomic, strong) UIImageView *bgView;
24 24 @property (nonatomic, strong) CNLiveGenerateCodeView *qrCodeView;
25 25  
26 26 @end
27 27  
28   -@implementation CNLiveGenerateCodeController
  28 +@implementation CNLiveGenerateQrCodeController
29 29 static const NSInteger margin = 20;
30 30 static const CGFloat timeValue = 1.5;
31   -
  31 +- (void)setID:(NSString *)ID{
  32 + _ID = ID;
  33 +}
32 34 #pragma mark - 生命周期
33 35 - (void)viewWillAppear:(BOOL)animated{
34 36 [super viewWillAppear:animated];
... ... @@ -47,7 +49,7 @@ static const CGFloat timeValue = 1.5;
47 49 }
48 50  
49 51 - (void)dealloc {
50   - NSLog(@"CNLiveGenerateCodeController -- dealloc");
  52 + NSLog(@"CNLiveGenerateQrCodeController -- dealloc");
51 53  
52 54 }
53 55  
... ... @@ -221,7 +223,7 @@ static const CGFloat timeValue = 1.5;
221 223 }
222 224 - (CNLiveGenerateCodeView *)qrCodeView {
223 225 if (!_qrCodeView) {
224   - _qrCodeView = [[CNLiveGenerateCodeView alloc]initWithID:@"asdasr"];
  226 + _qrCodeView = [[CNLiveGenerateCodeView alloc]initWithID:self.ID];
225 227 _qrCodeView.frame = CGRectMake(0, 0, SCREEN_WIDTH-2*margin, SCREEN_WIDTH-2*margin+40);
226 228 _qrCodeView.center = self.view.center;
227 229 }
... ...
CNLiveQrCodeModule/Classes/Controller/CNLiveGroupQrCodeController.h
... ... @@ -6,7 +6,6 @@
6 6 // Copyright (c) 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
9   -
10 9 /**
11 10 * 群组二维码
12 11 */
... ...
CNLiveQrCodeModule/Classes/Controller/CNLiveScanResultController.h
... ... @@ -6,6 +6,10 @@
6 6 // Copyright (c) 2019 153993236@qq.com. All rights reserved.
7 7 //
8 8  
  9 +/**
  10 + * 扫码结果
  11 + */
  12 +
9 13 #import <UIKit/UIKit.h>
10 14  
11 15 @interface CNLiveScanResultController : UIViewController
... ...
CNLiveQrCodeModule/Classes/Module/CNLiveQrCodeService.m
... ... @@ -14,6 +14,8 @@
14 14 #import "CNLiveMyQrCodeController.h"
15 15 // 群二维码名片
16 16 #import "CNLiveGroupQrCodeController.h"
  17 +// 生成二维码
  18 +#import "CNLiveGenerateQrCodeController.h"
17 19  
18 20 @BeeHiveService(CNLiveQrCodeServiceProtocol,CNLiveQrCodeService)
19 21 @interface CNLiveQrCodeService ()<CNLiveQrCodeServiceProtocol>
... ... @@ -54,4 +56,15 @@
54 56 // [CNLivePageJumpManager pushViewController:vc];
55 57 }
56 58  
  59 +// 生成二维码
  60 +- (UIViewController *)getGenerateQrCodeController {
  61 + return [CNLiveGenerateQrCodeController new];
  62 +}
  63 +
  64 +- (void)pushToGenerateQrCodeController:(NSString *)ID {
  65 + CNLiveGenerateQrCodeController *vc = [[CNLiveGenerateQrCodeController alloc]init];
  66 + vc.ID = ID;
  67 +// [CNLivePageJumpManager pushViewController:vc];
  68 +}
  69 +
57 70 @end
... ...
Example/CNLiveQrCodeModule/CNLIVEAppDelegate.m
... ... @@ -11,7 +11,7 @@
11 11 #import "CNLiveScanQrCodeController.h"
12 12 #import "CNLiveGroupQrCodeController.h"
13 13 #import "CNLiveScanResultController.h"
14   -#import "CNLiveGenerateCodeController.h"
  14 +#import "CNLiveGenerateQrCodeController.h"
15 15  
16 16 #import "CNLiveNetworking.h"
17 17 #import "CNLiveEnvironment.h"
... ... @@ -63,8 +63,8 @@
63 63 }];
64 64 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
65 65  
66   - CNLiveGenerateCodeController *vc = [[CNLiveGenerateCodeController alloc] init];
67   -// vc.jump_URL = @"http://www.baidu.com";
  66 + CNLiveGenerateQrCodeController *vc = [[CNLiveGenerateQrCodeController alloc] init];
  67 + vc.ID = @"http://www.baidu.com";
68 68 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
69 69  
70 70 self.window.rootViewController = nav;//设置根视图控制器
... ...