链接wifi界面适配iPhone X
This commit is contained in:
parent
62c7398284
commit
d51b0c90cd
|
|
@ -562,8 +562,13 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
||||||
//967/1018/ 0.95
|
//967/1018/ 0.95
|
||||||
|
|
||||||
CGFloat percentHbiW = 0.117 ;//5s 35/300
|
CGFloat percentHbiW = 0.117 ;//5s 35/300
|
||||||
|
CGFloat y;
|
||||||
self.nodImg= [[UIImageView alloc] initWithFrame:CGRectMake(5, 20 + 64,12, 12)];
|
if (is_iPhone_X) {
|
||||||
|
y = 20 + 88;
|
||||||
|
} else {
|
||||||
|
y = 20 + 64;
|
||||||
|
}
|
||||||
|
self.nodImg= [[UIImageView alloc] initWithFrame:CGRectMake(5, y,12, 12)];
|
||||||
self.nodImg.image = [UIImage imageNamed:@"linkingdevice_point"];
|
self.nodImg.image = [UIImage imageNamed:@"linkingdevice_point"];
|
||||||
[self.view addSubview:self.nodImg];
|
[self.view addSubview:self.nodImg];
|
||||||
|
|
||||||
|
|
@ -587,7 +592,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
||||||
CGFloat labelSizeW = [self widthForString:self.wifilabel.text fontSize:18 andHeight:10];
|
CGFloat labelSizeW = [self widthForString:self.wifilabel.text fontSize:18 andHeight:10];
|
||||||
CGFloat labelH= [self heightForString:self.wifilabel.text fontSize:18 andWidth:labelSizeW];
|
CGFloat labelH= [self heightForString:self.wifilabel.text fontSize:18 andWidth:labelSizeW];
|
||||||
|
|
||||||
self.wifilabel.frame = CGRectMake(CGRectGetMaxX(self.nodImg.frame), 20 + 64, labelSizeW, labelH);
|
self.wifilabel.frame = CGRectMake(CGRectGetMaxX(self.nodImg.frame), y, labelSizeW, labelH);
|
||||||
|
|
||||||
[self.view addSubview:self.wifilabel];
|
[self.view addSubview:self.wifilabel];
|
||||||
//wifi 输入框
|
//wifi 输入框
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ extern BOOL isfromCameraView;
|
||||||
self.view.backgroundColor=[UIColor whiteColor];
|
self.view.backgroundColor=[UIColor whiteColor];
|
||||||
_deviceArry =[[NSMutableArray alloc]init];
|
_deviceArry =[[NSMutableArray alloc]init];
|
||||||
|
|
||||||
|
[self updateUI];
|
||||||
[self getSSid];
|
[self getSSid];
|
||||||
//输入框在上面新UI 可去
|
//输入框在上面新UI 可去
|
||||||
|
|
||||||
|
|
@ -136,6 +137,17 @@ extern BOOL isfromCameraView;
|
||||||
[self creatConnectStateUI];
|
[self creatConnectStateUI];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateUI {
|
||||||
|
CGFloat yOffset = 0;
|
||||||
|
if (is_iPhone_X) {
|
||||||
|
yOffset = 20 + 88;
|
||||||
|
} else {
|
||||||
|
yOffset = 20 + 64;
|
||||||
|
}
|
||||||
|
self.nodImg.frame = CGRectMake(12, yOffset, 10, 10);
|
||||||
|
self.wifiNamelabel.frame = CGRectMake(23, yOffset - 18 + 5, 336, 36);
|
||||||
|
}
|
||||||
|
|
||||||
-(void)viewWillAppear:(BOOL)animated{
|
-(void)viewWillAppear:(BOOL)animated{
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ static MyIntroductionViewController * introduction = nil;
|
||||||
for (int i=0; i<self.imageNames.count; i++) {
|
for (int i=0; i<self.imageNames.count; i++) {
|
||||||
UIImageView * imgV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:self.imageNames[i]]];
|
UIImageView * imgV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:self.imageNames[i]]];
|
||||||
imgV.userInteractionEnabled=true;
|
imgV.userInteractionEnabled=true;
|
||||||
imgV.contentMode = UIViewContentModeScaleAspectFill;
|
imgV.contentMode = UIViewContentModeScaleAspectFit;
|
||||||
imgV.layer.masksToBounds = YES;
|
imgV.layer.masksToBounds = YES;
|
||||||
CGFloat x = i * width;
|
CGFloat x = i * width;
|
||||||
imgV.frame = CGRectMake(x, 0, width, height);
|
imgV.frame = CGRectMake(x, 0, width, height);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue