热点连接部分bug修复
This commit is contained in:
@@ -13,9 +13,7 @@
|
||||
//#import <BaiduMapAPI_Search/BMKGeocodeSearch.h>
|
||||
|
||||
@interface LogInViewController : BaseViewController
|
||||
{
|
||||
// BMKGeoCodeSearch*_geocodesearch;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField *loginPhoneNumberTextField;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *loginPasswordTextField;
|
||||
- (IBAction)LogIn:(id)sender;
|
||||
|
||||
@@ -65,9 +65,12 @@
|
||||
[self getLocation];
|
||||
_logInButton.backgroundColor=COLOR_LABEL_TITLE;
|
||||
_logInButton.layer.cornerRadius = 5;
|
||||
|
||||
[self.loginPhoneNumberTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.loginPasswordTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
if (@available(iOS 13.0, *)){//iOS13之后,设置颜色的方便变更
|
||||
|
||||
}else{
|
||||
[self.loginPhoneNumberTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.loginPasswordTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
}
|
||||
|
||||
[self.wangJiBtn addTarget:self action:@selector(forgetPassword:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.wangJiBtn setTitleColor:[UIColor colorWithRed:146/255.0f green:146/255.0f blue:146/255.0f alpha:1] forState:UIControlStateNormal];
|
||||
@@ -133,6 +136,7 @@
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
// _geocodesearch.delegate=self;// 此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
// _locService.delegate=self;
|
||||
[super viewWillAppear:animated];
|
||||
if ([CLLocationManager locationServicesEnabled]) {
|
||||
_locationManager = [[CLLocationManager alloc]init];
|
||||
_locationManager.delegate = self;
|
||||
@@ -187,7 +191,11 @@
|
||||
self.loginPhoneNumberTextField.leftView=phoneView;
|
||||
self.loginPhoneNumberTextField.leftViewMode=UITextFieldViewModeAlways;
|
||||
self.loginPhoneNumberTextField.layer.cornerRadius=6;
|
||||
if (@available(iOS 13.0, *)){//iOS13之后,设置颜色的方便变更
|
||||
|
||||
}else{
|
||||
[self.loginPhoneNumberTextField setValue:[UIColor colorWithRed:146.0/255.0 green:146.0/255.0 blue:146.0/255.0 alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
}
|
||||
|
||||
UIView*passView=[[UIView alloc]initWithFrame:CGRectMake(0,30, 50, 30)];
|
||||
UIImageView*passIcon=[[UIImageView alloc]initWithFrame:CGRectMake(15,5, 17, 20)];
|
||||
@@ -196,7 +204,11 @@
|
||||
self.loginPasswordTextField.leftView=passView;
|
||||
self.loginPasswordTextField.leftViewMode=UITextFieldViewModeAlways;
|
||||
self.loginPasswordTextField.layer.cornerRadius=6;
|
||||
if (@available(iOS 13.0, *)){//iOS13之后,设置颜色的方便变更
|
||||
|
||||
}else{
|
||||
[self.loginPasswordTextField setValue:[UIColor colorWithRed:146.0/255.0 green:146.0/255.0 blue:146.0/255.0 alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
}
|
||||
// 设置用户头像
|
||||
// int i = (arc4random()%11) + 1;// 设置随机头像
|
||||
// self.userIconImg.image=[UIImage imageNamed:[NSString stringWithFormat:@"acount%d.png",i]];
|
||||
|
||||
@@ -88,9 +88,14 @@ extern BOOL formLogIn;
|
||||
|
||||
self.registBtn.backgroundColor=COLOR_LABEL_TITLE;
|
||||
self.view.backgroundColor= [UIColor colorWithPatternImage:[UIImage imageNamed:@"enter_background"]];
|
||||
[self.passwordTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.phoneNumberTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.verifyTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
|
||||
if (@available(iOS 13.0, *)){//iOS13之后,设置颜色的方便变更
|
||||
|
||||
}else{
|
||||
[self.passwordTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.phoneNumberTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
[self.verifyTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];
|
||||
}
|
||||
|
||||
[self addNaviItem];
|
||||
[self setTextkeyboadType];
|
||||
@@ -204,18 +209,6 @@ extern BOOL formLogIn;
|
||||
|
||||
-(void)getVerifycode{
|
||||
|
||||
//原来只支持香港澳门 台湾 大陆 已废弃
|
||||
//BOOL isMacth=[dataContorl valiMobile:self.phoneNumberTextField.text];
|
||||
|
||||
//if (!isMacth) {
|
||||
|
||||
// [self.view makeToast:@"请输入正确手机号"];
|
||||
|
||||
// return;
|
||||
//}
|
||||
|
||||
//NSString *zone = [dataContorl areaCode:self.phoneNumberTextField.text];
|
||||
//self.areaCode = zone;
|
||||
BOOL isTextCode = [[self.timeBtn titleForState:UIControlStateNormal] isEqualToString:@"短信验证码"];
|
||||
[IFISHHTTPTOOL getverifyWithTimerButton:_timeBtn addphoneNumber:self.phoneNumberTextField.text zone:self.areaCode isTextCode:isTextCode result:^(NSError *err) {
|
||||
|
||||
@@ -291,26 +284,21 @@ extern BOOL formLogIn;
|
||||
labe.textColor=[UIColor whiteColor];
|
||||
self.navigationItem.titleView=labe;
|
||||
|
||||
// UIButton*rightButton = [[UIButton alloc]initWithFrame:CGRectMake(25,0,60,60)];
|
||||
// [rightButton setTitle:@"登录" forState:UIControlStateNormal];
|
||||
// rightButton.backgroundColor=[UIColor clearColor];
|
||||
// [rightButton addTarget:self action:@selector(rightItemBtn:) forControlEvents:UIControlEventTouchUpInside];
|
||||
// UIImageView*imageView=[[UIImageView alloc]initWithFrame:CGRectMake(25,0,60,60)];
|
||||
//
|
||||
// [imageView addSubview:rightButton];
|
||||
// imageView.userInteractionEnabled=YES;
|
||||
// UIBarButtonItem*rightItem = [[UIBarButtonItem alloc]initWithCustomView:imageView];
|
||||
// self.navigationItem.rightBarButtonItem= rightItem;
|
||||
UIButton*rightButton = [[UIButton alloc]initWithFrame:CGRectMake(25,0,60,60)];
|
||||
[rightButton setTitle:@"登录" forState:UIControlStateNormal];
|
||||
rightButton.backgroundColor=[UIColor clearColor];
|
||||
[rightButton.titleLabel setFont:[UIFont systemFontOfSize:14]];
|
||||
[rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[rightButton addTarget:self action:@selector(rightButtonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UIBarButtonItem*rightItem= [[UIBarButtonItem alloc] initWithTitle:@"登录" style:UIBarButtonItemStyleDone target:self action:@selector(rightItemBtn:)];
|
||||
UIBarButtonItem*rightItem= [[UIBarButtonItem alloc] initWithCustomView:rightButton];
|
||||
// rightItem.tintColor=[UIColor whiteColor];
|
||||
// [rightItem setTintColor:[UIColor whiteColor]];
|
||||
self.navigationItem.rightBarButtonItem= rightItem;
|
||||
[self.navigationItem.rightBarButtonItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:14],UITextAttributeFont, [UIColor whiteColor], UITextAttributeTextColor, nil] forState:UIControlStateNormal];
|
||||
// [self.navigationItem.rightBarButtonItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:14],UITextAttributeFont, [UIColor whiteColor], UITextAttributeTextColor, nil] forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
-(void)rightItemBtn:(id)sender{
|
||||
|
||||
-(void)rightButtonClick:(UIButton *)sender{
|
||||
LogInViewController *login=[[LogInViewController alloc]init];
|
||||
[self.navigationController pushViewController:login animated:YES];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user