|
|
@@ -337,7 +337,7 @@
|
|
|
if (_loginButton == nil)
|
|
|
{
|
|
|
_loginButton = [[UIButton alloc] init];
|
|
|
- _loginButton.layer.cornerRadius = 25;
|
|
|
+ _loginButton.layer.cornerRadius = 5;
|
|
|
_loginButton.layer.masksToBounds = YES;
|
|
|
_loginButton.titleLabel.font = [UIFont systemFontOfSize:HJHorizontalScale(19)];
|
|
|
[_loginButton setTitle:@"登录" forState:UIControlStateNormal];
|
|
|
@@ -367,14 +367,18 @@
|
|
|
[_wechatLoginButton setTitle:@"微信快捷登录" forState:UIControlStateNormal];
|
|
|
[_wechatLoginButton setTitleColor:COLOR_BACKC forState:UIControlStateNormal];
|
|
|
[_wechatLoginButton addTarget:self action:@selector(wechatLoginButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
-
|
|
|
+ _wechatLoginButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
|
//文字图片上下显示
|
|
|
CGSize imageSize = CGSizeMake(28, 23);
|
|
|
CGSize titleSize = CGSizeMake(75, 10);
|
|
|
CGFloat maxWidth = MAX(imageSize.width, titleSize.width);
|
|
|
CGFloat padding = 20;
|
|
|
- _wechatLoginButton.imageRect = CGRectMake((maxWidth - imageSize.width) / 2, 0, imageSize.width, imageSize.height);
|
|
|
- _wechatLoginButton.titleRect = CGRectMake((maxWidth - titleSize.width) / 2, imageSize.height + padding, titleSize.width, titleSize.height);
|
|
|
+// _wechatLoginButton.imageRect = CGRectMake((maxWidth - imageSize.width) / 2, 0, imageSize.width, imageSize.height);
|
|
|
+// _wechatLoginButton.titleRect = CGRectMake((maxWidth - titleSize.width) / 2, imageSize.height + padding, titleSize.width, titleSize.height);
|
|
|
+
|
|
|
+ [_wechatLoginButton setImageEdgeInsets:UIEdgeInsetsMake(0, 0, titleSize.height + padding, 0)];
|
|
|
+ [_wechatLoginButton setTitleEdgeInsets:UIEdgeInsetsMake(imageSize.height + padding, - titleSize.width, 0, 0)];
|
|
|
+
|
|
|
_wechatLoginButton.frame = CGRectMake(0, 0, maxWidth, imageSize.height + titleSize.height + padding);
|
|
|
}
|
|
|
return _wechatLoginButton;
|