链接wifi界面适配iPhone X

This commit is contained in:
xuemh 2018-03-30 21:39:49 +08:00
parent 62c7398284
commit d51b0c90cd
3 changed files with 21 additions and 4 deletions

View File

@ -562,8 +562,13 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
//967/1018/ 0.95
CGFloat percentHbiW = 0.117 ;//5s 35/300
self.nodImg= [[UIImageView alloc] initWithFrame:CGRectMake(5, 20 + 64,12, 12)];
CGFloat y;
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.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 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];
//wifi 输入框

View File

@ -96,6 +96,7 @@ extern BOOL isfromCameraView;
self.view.backgroundColor=[UIColor whiteColor];
_deviceArry =[[NSMutableArray alloc]init];
[self updateUI];
[self getSSid];
//UI
@ -136,6 +137,17 @@ extern BOOL isfromCameraView;
[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{
[super viewWillAppear:animated];

View File

@ -102,7 +102,7 @@ static MyIntroductionViewController * introduction = nil;
for (int i=0; i<self.imageNames.count; i++) {
UIImageView * imgV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:self.imageNames[i]]];
imgV.userInteractionEnabled=true;
imgV.contentMode = UIViewContentModeScaleAspectFill;
imgV.contentMode = UIViewContentModeScaleAspectFit;
imgV.layer.masksToBounds = YES;
CGFloat x = i * width;
imgV.frame = CGRectMake(x, 0, width, height);