Initial commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// CreatErWeiMaController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/12/2.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "CreatErWeiMaController.h"
|
||||
#import "QRCodeGenerator.h"
|
||||
#import "DeviceModel.h"
|
||||
@interface CreatErWeiMaController ()
|
||||
@property(nonatomic,strong)NSArray*arry;
|
||||
@end
|
||||
|
||||
@implementation CreatErWeiMaController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
UILabel*labe=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 44)];
|
||||
labe.text=@"分享设备";
|
||||
labe.textAlignment=NSTextAlignmentCenter;
|
||||
labe.textColor=[UIColor whiteColor];
|
||||
self.navigationItem.titleView=labe;
|
||||
self.view.backgroundColor=COLOR_MIAN;
|
||||
[self creatEr];
|
||||
[self.view bringSubviewToFront:self.erWeiMaView];
|
||||
|
||||
}
|
||||
-(void)creatEr{
|
||||
// NSUserDefaults*userfult=[NSUserDefaults standardUserDefaults];
|
||||
// NSInteger dex=[userfult integerForKey:@"lastIndex"];
|
||||
// _arry=[[DataCenter defaultDtacenter]valueForKey:@"deviceInfo"];
|
||||
// DeviceModel*devicemodel=[[DeviceModel alloc]init];
|
||||
// if (dex) {
|
||||
// devicemodel=_arry[dex];
|
||||
// }else{
|
||||
// devicemodel=_arry[0];
|
||||
// }
|
||||
|
||||
//DeviceModel*model=[_arry objectAtIndex:0];//分享选中设备
|
||||
NSString*str=[NSString stringWithFormat:@"deviceId=%@",self.erdevicemodel.deviceId];
|
||||
self.erWeiMaView.image=[QRCodeGenerator qrImageForString:str imageSize:self.erWeiMaView.bounds.size.width];
|
||||
|
||||
}
|
||||
- (void)didReceiveMemoryWarning {
|
||||
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
|
||||
self.navigationController.navigationBarHidden =NO;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user