fix 中文乱码
This commit is contained in:
parent
fdee3e47f4
commit
7685ce516e
|
|
@ -228,9 +228,9 @@
|
||||||
if (jsonString == nil) {
|
if (jsonString == nil) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
//⚠️ 13.2.0库编码采用 isoLatin1
|
||||||
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
//NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
NSData *jsonData = [jsonString dataUsingEncoding:NSISOLatin1StringEncoding];
|
||||||
NSError *err;
|
NSError *err;
|
||||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
|
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
|
||||||
options:NSJSONReadingMutableContainers
|
options:NSJSONReadingMutableContainers
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,7 @@
|
||||||
[self.faceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.faceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.mas_equalTo(self.view.mas_top).offset(91 + PhoneX_TopMargin);
|
make.top.mas_equalTo(self.view.mas_top).offset(91 + PhoneX_TopMargin);
|
||||||
make.size.mas_equalTo(CGSizeMake(99, 124));
|
make.size.mas_equalTo(CGSizeMake(99, 124));
|
||||||
|
|
||||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
@ -282,21 +283,21 @@
|
||||||
|
|
||||||
//up
|
//up
|
||||||
[self.swipeGaurdimagView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.swipeGaurdimagView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.mas_equalTo(self.view.mas_top).offset(368);
|
make.top.mas_equalTo(self.view.mas_top).offset(368 + PhoneX_TopMargin);
|
||||||
make.width.and.height.mas_equalTo(20);
|
make.width.and.height.mas_equalTo(20);
|
||||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
//startMask
|
//startMask
|
||||||
[self.startMaskButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.startMaskButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.mas_equalTo(self.view.mas_top).offset(412);
|
make.top.mas_equalTo(self.view.mas_top).offset(412 + PhoneX_TopMargin);
|
||||||
make.size.mas_equalTo(CGSizeMake(117, 25));
|
make.size.mas_equalTo(CGSizeMake(117, 25));
|
||||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
//startTest
|
//startTest
|
||||||
[self.startTestButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.startTestButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.mas_equalTo(self.view.mas_top).offset(486);
|
make.top.mas_equalTo(self.view.mas_top).offset(486 + PhoneX_TopMargin);
|
||||||
make.size.mas_equalTo(CGSizeMake(132, 41));
|
make.size.mas_equalTo(CGSizeMake(132, 41));
|
||||||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||||
}];
|
}];
|
||||||
|
|
@ -532,7 +533,7 @@
|
||||||
|
|
||||||
[self.view addSubview:self.waringView];
|
[self.view addSubview:self.waringView];
|
||||||
[UIView animateWithDuration:0.4 animations:^{
|
[UIView animateWithDuration:0.4 animations:^{
|
||||||
self.waringView.frame = CGRectMake(0,CGRectGetMaxY(self.view.frame) - 60, self.view.frame.size.width, 60);
|
self.waringView.frame = CGRectMake(0,CGRectGetMaxY(self.view.frame) - 60 - PhoneX_BottomMargin, self.view.frame.size.width, 60);
|
||||||
}];
|
}];
|
||||||
[self.waringView showView];
|
[self.waringView showView];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ static const CGFloat kInputViewH = 44.f;
|
||||||
|
|
||||||
-(void)creatInputView{
|
-(void)creatInputView{
|
||||||
|
|
||||||
UIView *commitView =[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - kInputViewH, self.bounds.size.width, kInputViewH)];
|
UIView *commitView =[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - kInputViewH - PhoneX_BottomMargin, self.bounds.size.width, kInputViewH)];
|
||||||
|
|
||||||
self.commitInputView = commitView;
|
self.commitInputView = commitView;
|
||||||
self.commitInputView.backgroundColor = GIGARGB(241, 241, 241, 1);
|
self.commitInputView.backgroundColor = GIGARGB(241, 241, 241, 1);
|
||||||
|
|
@ -170,7 +170,7 @@ static const CGFloat kInputViewH = 44.f;
|
||||||
|
|
||||||
- (void) keyboardWillHide:(NSNotification *)note
|
- (void) keyboardWillHide:(NSNotification *)note
|
||||||
{
|
{
|
||||||
self.commitInputView.frame = CGRectMake(0, self.bounds.size.height - kInputViewH, self.bounds.size.width, kInputViewH);
|
self.commitInputView.frame = CGRectMake(0, self.bounds.size.height - kInputViewH - PhoneX_BottomMargin, self.bounds.size.width, kInputViewH);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue