键盘的背景图添加高斯模糊
This commit is contained in:
@@ -78,6 +78,7 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
|||||||
@property(nonatomic, strong) UIImageView *bgImageView; // 背景图(在底层)
|
@property(nonatomic, strong) UIImageView *bgImageView; // 背景图(在底层)
|
||||||
@property(nonatomic, strong) UIImageView *personaAvatarImageView; // 语音模式下显示的 persona 小头像
|
@property(nonatomic, strong) UIImageView *personaAvatarImageView; // 语音模式下显示的 persona 小头像
|
||||||
@property(nonatomic, strong) UIImageView *personaGrayImageView; // 语音模式下显示的 persona 小头像
|
@property(nonatomic, strong) UIImageView *personaGrayImageView; // 语音模式下显示的 persona 小头像
|
||||||
|
@property(nonatomic, strong) UIVisualEffectView *personaBlurView; // 语音模式下头像高斯模糊层
|
||||||
|
|
||||||
@property(nonatomic, strong) KBChatPanelView *chatPanelView;
|
@property(nonatomic, strong) KBChatPanelView *chatPanelView;
|
||||||
@property(nonatomic, strong) KBKeyboardSubscriptionView *subscriptionView;
|
@property(nonatomic, strong) KBKeyboardSubscriptionView *subscriptionView;
|
||||||
@@ -1407,6 +1408,10 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
|||||||
_personaAvatarImageView.contentMode = UIViewContentModeScaleAspectFill;
|
_personaAvatarImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||||
_personaAvatarImageView.clipsToBounds = YES;
|
_personaAvatarImageView.clipsToBounds = YES;
|
||||||
_personaAvatarImageView.hidden = YES;
|
_personaAvatarImageView.hidden = YES;
|
||||||
|
[_personaAvatarImageView addSubview:self.personaBlurView];
|
||||||
|
[self.personaBlurView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(_personaAvatarImageView);
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
return _personaAvatarImageView;
|
return _personaAvatarImageView;
|
||||||
}
|
}
|
||||||
@@ -1419,6 +1424,16 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
|||||||
return _personaGrayImageView;
|
return _personaGrayImageView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (UIVisualEffectView *)personaBlurView {
|
||||||
|
if (!_personaBlurView) {
|
||||||
|
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||||
|
_personaBlurView = [[UIVisualEffectView alloc] initWithEffect:effect];
|
||||||
|
_personaBlurView.hidden = YES;
|
||||||
|
_personaBlurView.userInteractionEnabled = NO;
|
||||||
|
}
|
||||||
|
return _personaBlurView;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Persona Avatar
|
#pragma mark - Persona Avatar
|
||||||
|
|
||||||
/// 从 AppGroup 读取选中的 persona 信息
|
/// 从 AppGroup 读取选中的 persona 信息
|
||||||
@@ -1475,6 +1490,7 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
|||||||
if (image) {
|
if (image) {
|
||||||
self.personaAvatarImageView.image = image;
|
self.personaAvatarImageView.image = image;
|
||||||
self.personaAvatarImageView.hidden = NO;
|
self.personaAvatarImageView.hidden = NO;
|
||||||
|
self.personaBlurView.hidden = NO;
|
||||||
NSLog(@"[Keyboard] persona 封面图加载成功");
|
NSLog(@"[Keyboard] persona 封面图加载成功");
|
||||||
} else {
|
} else {
|
||||||
NSLog(@"[Keyboard] persona 封面图加载失败");
|
NSLog(@"[Keyboard] persona 封面图加载失败");
|
||||||
@@ -1485,6 +1501,7 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
|||||||
- (void)kb_hidePersonaAvatar {
|
- (void)kb_hidePersonaAvatar {
|
||||||
self.personaAvatarImageView.hidden = YES;
|
self.personaAvatarImageView.hidden = YES;
|
||||||
self.personaAvatarImageView.image = nil;
|
self.personaAvatarImageView.image = nil;
|
||||||
|
self.personaBlurView.hidden = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Actions
|
#pragma mark - Actions
|
||||||
|
|||||||
Reference in New Issue
Block a user