login 适配 se 5s 新增icon 主页修改
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// SHineLabel.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/4.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface SHineLabel : UILabel
|
||||
//外光
|
||||
@property(nonatomic,retain) UIColor *outLineColor;
|
||||
//里光
|
||||
@property(nonatomic,retain) UIColor *oinsideColor;
|
||||
//光晕
|
||||
@property(nonatomic,retain) UIColor *blurColor;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// SHineLabel.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/4.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SHineLabel.h"
|
||||
|
||||
@implementation SHineLabel
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)drawRect:(CGRect)rect{
|
||||
|
||||
CGContextRef ctx = UIGraphicsGetCurrentContext();
|
||||
CGContextSetStrokeColorWithColor(ctx, self.outLineColor.CGColor);
|
||||
CGContextSetFillColorWithColor(ctx, self.oinsideColor.CGColor);
|
||||
CGContextSetLineWidth(ctx, self.font.pointSize /60.0);
|
||||
CGContextSetShadowWithColor(ctx, CGSizeMake(0, 0), self.font.pointSize / 3 , self.blurColor.CGColor);
|
||||
CGTextDrawingMode mode = !self.outLineColor ? kCGTextFill:(!self.oinsideColor ? kCGTextStroke:kCGTextFillStroke);
|
||||
CGContextSetTextDrawingMode(ctx, mode);
|
||||
NSMutableParagraphStyle *paragraStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
paragraStyle.alignment = NSTextAlignmentCenter;
|
||||
|
||||
[self.text drawInRect:self.bounds withAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Semibold" size:22],NSForegroundColorAttributeName:[UIColor whiteColor],NSKernAttributeName:@(4),NSParagraphStyleAttributeName:paragraStyle}];
|
||||
|
||||
}
|
||||
-(void)dealloc{
|
||||
self.outLineColor = nil;
|
||||
self.oinsideColor = nil;
|
||||
self.blurColor = nil;
|
||||
|
||||
}
|
||||
@end
|
||||
@@ -15,6 +15,6 @@
|
||||
//设置透明导航
|
||||
-(void)setClearNav;
|
||||
|
||||
-(void)resetBackgroundImage;
|
||||
-(void)setBackgroundImage;
|
||||
|
||||
@end
|
||||
|
||||
@@ -24,13 +24,14 @@ static char overlayKey;
|
||||
{
|
||||
if (!self.overlay) {
|
||||
[self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
|
||||
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)];
|
||||
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -PhoneX_STATUBAR_H, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + PhoneX_STATUBAR_H)];
|
||||
self.overlay.userInteractionEnabled = NO;
|
||||
self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
|
||||
//self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
|
||||
[self insertSubview:self.overlay atIndex:0];
|
||||
}
|
||||
|
||||
self.overlay.backgroundColor = backgroundColor;
|
||||
self.overlay.backgroundColor = [backgroundColor colorWithAlphaComponent:0.2];
|
||||
|
||||
}
|
||||
|
||||
- (void)cnReset
|
||||
@@ -54,11 +55,9 @@ static char overlayKey;
|
||||
|
||||
}
|
||||
|
||||
-(void)resetBackgroundImage{
|
||||
-(void)setBackgroundImage{
|
||||
|
||||
[self setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user