房间公屏UI更改
This commit is contained in:
@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MsRoomMessagChatHallHeadView : UIView
|
@interface MsRoomMessagChatHallHeadView : UIView
|
||||||
@property(nonatomic,copy) NSString *content;
|
@property(nonatomic,copy) NSString *content;
|
||||||
|
-(void)setUIColor;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -27,23 +27,27 @@
|
|||||||
}
|
}
|
||||||
-(void)installConstraints{
|
-(void)installConstraints{
|
||||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.edges.equalTo(self).offset(10);
|
make.leading.trailing.top.bottom.equalTo(self).inset(10);
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
-(void)setContent:(NSString *)content{
|
-(void)setContent:(NSString *)content{
|
||||||
_content = content;
|
_content = content;
|
||||||
_titleView.text = _content;
|
_titleView.text = _content;
|
||||||
|
|
||||||
|
}
|
||||||
|
-(void)setUIColor{
|
||||||
[_titleView.superview layoutIfNeeded];
|
[_titleView.superview layoutIfNeeded];
|
||||||
// UIImage *bgImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE3B462),UIColorFromRGB(0x723505)] gradientType:GradientTypeLeftToRight imgSize:self.frame.size];
|
UIImage *bgImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE3B462),UIColorFromRGB(0x723505)] gradientType:GradientTypeLeftToRight imgSize:self.frame.size];
|
||||||
// self.backgroundColor = [UIColor colorWithPatternImage:bgImage];
|
self.backgroundColor = [UIColor colorWithPatternImage:bgImage];
|
||||||
// UIImage *borderImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xF7D364),UIColorFromRGB(0xFFFAE4),UIColorFromRGB(0xF7D364)] gradientType:GradientTypeLeftToRight imgSize:self.frame.size];
|
UIImage *borderImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xF7D364),UIColorFromRGB(0xFFFAE4),UIColorFromRGB(0xF7D364)] gradientType:GradientTypeLeftToRight imgSize:self.frame.size];
|
||||||
// self.layer.borderColor = [UIColor colorWithPatternImage:borderImage].CGColor;
|
self.layer.borderColor = [UIColor colorWithPatternImage:borderImage].CGColor;
|
||||||
}
|
}
|
||||||
#pragma mark - 懒加载
|
#pragma mark - 懒加载
|
||||||
- (UILabel *)titleView{
|
- (UILabel *)titleView{
|
||||||
if(!_titleView){
|
if(!_titleView){
|
||||||
_titleView = [UILabel labelInitWithText:@"" font:[UIFont systemFontOfSize:13 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0xFFF6E1)];
|
_titleView = [UILabel labelInitWithText:@"" font:[UIFont systemFontOfSize:13 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0xFFF6E1)];
|
||||||
_titleView.textAlignment = NSTextAlignmentCenter;
|
_titleView.textAlignment = NSTextAlignmentCenter;
|
||||||
|
_titleView.numberOfLines = 0;
|
||||||
}
|
}
|
||||||
return _titleView;
|
return _titleView;
|
||||||
}
|
}
|
||||||
|
@@ -118,6 +118,7 @@
|
|||||||
make.height.mas_greaterThanOrEqualTo(0);
|
make.height.mas_greaterThanOrEqualTo(0);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
[self.headerView setUIColor];
|
||||||
}else{
|
}else{
|
||||||
[self.headerView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
[self.headerView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.leading.mas_equalTo(self).offset(15);
|
make.leading.mas_equalTo(self).offset(15);
|
||||||
@@ -182,6 +183,7 @@
|
|||||||
make.height.mas_equalTo(0);
|
make.height.mas_equalTo(0);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
[self.headerView setUIColor];
|
||||||
}else{
|
}else{
|
||||||
self.headerView.content = topModel.content;
|
self.headerView.content = topModel.content;
|
||||||
[self.headerView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
[self.headerView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -190,6 +192,7 @@
|
|||||||
make.height.mas_greaterThanOrEqualTo(0);
|
make.height.mas_greaterThanOrEqualTo(0);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
[self.headerView setUIColor];
|
||||||
}
|
}
|
||||||
if(topModel.recordStatus == 1){
|
if(topModel.recordStatus == 1){
|
||||||
return NO;
|
return NO;
|
||||||
|
Reference in New Issue
Block a user