Commit a3b5e00d by ludi

Merge branch 'feature/UI修改版本' of http://git.yabolive.net:88/pidan/FuSiLive into feature/UI修改版本

parents 74681a63 8441e6ee
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "HOT@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "HOT@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -825,23 +825,25 @@ ...@@ -825,23 +825,25 @@
if (pkBtnState == FUSLiveChatToolPKBtnStateCancel) { if (pkBtnState == FUSLiveChatToolPKBtnStateCancel) {
[self.toolBtn2 setImage:[UIImage imageNamed:@"Live_bottom_audience_PK_Normal"] forState:UIControlStateNormal]; [self.toolBtn2 setImage:[UIImage imageNamed:@"Live_bottom_audience_PK_Normal"] forState:UIControlStateNormal];
[self.toolBtn2 setImage:[UIImage imageNamed:@"Live_bottom_audience_PK_highlight"] forState:UIControlStateHighlighted]; [self.toolBtn2 setImage:[UIImage imageNamed:@"Live_bottom_audience_PK_highlight"] forState:UIControlStateHighlighted];
[self.toolBtn2 setBackgroundImage:[UIImage animatedImageNamed:@"PKBottomBtnBgRotationAnimation_" duration:2] forState:UIControlStateNormal]; } else {
[self.toolBtn2 setImage:[UIImage imageNamed:@"Live_icon_toolview_highlighted_2"] forState:UIControlStateHighlighted];
[self.toolBtn2 setImage:[UIImage imageNamed:@"Live_icon_toolview_normal_2"] forState:UIControlStateNormal];
} }
switch (pkBtnState) { switch (pkBtnState) {
case FUSLiveChatToolPKBtnStateStart: case FUSLiveChatToolPKBtnStateStart:
{ {
[_PKBtn setBackgroundImage:nil forState:UIControlStateNormal]; [self.toolBtn2 setBackgroundImage:nil forState:UIControlStateNormal];
} }
break; break;
case FUSLiveChatToolPKBtnStateCancel: case FUSLiveChatToolPKBtnStateCancel:
{ {
[_PKBtn setBackgroundImage:[UIImage animatedImageNamed:@"PKBottomBtnBgRotationAnimation_" duration:2] forState:UIControlStateNormal]; [self.toolBtn2 setBackgroundImage:[UIImage animatedImageNamed:@"PKBottomBtnBgRotationAnimation_" duration:2] forState:UIControlStateNormal];
} }
break; break;
case FUSLiveChatToolPKBtnStateStop: case FUSLiveChatToolPKBtnStateStop:
{ {
[_PKBtn setBackgroundImage:nil forState:UIControlStateNormal]; [self.toolBtn2 setBackgroundImage:nil forState:UIControlStateNormal];
} }
break; break;
default: default:
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// 头像 image View // 头像 image View
@property (strong, nonatomic) FUSRichIconView *faceImageView; @property (strong, nonatomic) FUSRichIconView *faceImageView;
// 富豪等级 ImageView // top 的动效 ImageView
@property (strong, nonatomic) UIImageView *richManImageView; @property (strong, nonatomic) UIImageView *richManImageView;
@end @end
......
...@@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *rankNum; @property (nonatomic,copy) NSString *rankNum;
// 围观 // 围观
@property (nonatomic,copy) NSString *num; @property (nonatomic,copy) NSString *num;
// 人气值
@property (nonatomic,copy) NSString *popularScore;
// pk状态 // pk状态
@property (nonatomic,copy) NSString *status; @property (nonatomic,copy) NSString *status;
// 设置状态 // 设置状态
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
[_anchorImageView setWebImageWithSubURLString:model.face placeholder:[UIImage fus_defaultIcon] options:0]; [_anchorImageView setWebImageWithSubURLString:model.face placeholder:[UIImage fus_defaultIcon] options:0];
_nameLabel.text = model.nickname; _nameLabel.text = model.nickname;
_audienceLabel.text = [NSString stringWithFormat:@"%@",model.num]; _audienceLabel.text = [NSString stringWithFormat:@"%@",model.num];
_hotLabel.text = [NSString stringWithFormat:@"%@",model.rankNum]; _hotLabel.text = [NSString stringWithFormat:@"%@",model.popularScore];
if (model.status.integerValue == 0) { // 邀请pk if (model.status.integerValue == 0) { // 邀请pk
_operationBtn.enabled = YES; _operationBtn.enabled = YES;
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
<constraint firstAttribute="width" constant="14" id="RJJ-u6-Nyg"/> <constraint firstAttribute="width" constant="14" id="RJJ-u6-Nyg"/>
</constraints> </constraints>
</imageView> </imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PK_List_Hot" translatesAutoresizingMaskIntoConstraints="NO" id="U4S-TF-mgr"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="live_popular_hot" translatesAutoresizingMaskIntoConstraints="NO" id="U4S-TF-mgr">
<rect key="frame" x="95" y="40" width="15" height="6"/> <rect key="frame" x="95" y="37" width="12.5" height="12.5"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KZR-Fz-rB0"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KZR-Fz-rB0">
<rect key="frame" x="74" y="36" width="16" height="14"/> <rect key="frame" x="74" y="36" width="16" height="14"/>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rnu-Vj-c1y"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rnu-Vj-c1y">
<rect key="frame" x="110" y="36" width="16" height="14"/> <rect key="frame" x="107.5" y="36" width="16" height="14"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -113,6 +113,6 @@ ...@@ -113,6 +113,6 @@
</objects> </objects>
<resources> <resources>
<image name="PK_List_Audience" width="9" height="9.5"/> <image name="PK_List_Audience" width="9" height="9.5"/>
<image name="PK_List_Hot" width="15" height="6"/> <image name="live_popular_hot" width="12.5" height="12.5"/>
</resources> </resources>
</document> </document>
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
@property (strong, nonatomic) IBOutlet UIButton *facebookShareBtn; @property (strong, nonatomic) IBOutlet UIButton *facebookShareBtn;
@property (strong, nonatomic) IBOutlet UIButton *twitterShareBtn; @property (strong, nonatomic) IBOutlet UIButton *twitterShareBtn;
@property (strong, nonatomic) IBOutlet UIButton *lineShareBtn; @property (strong, nonatomic) IBOutlet UIButton *lineShareBtn;
@property (strong, nonatomic) IBOutlet UIButton *wechatShareBtn; //@property (strong, nonatomic) IBOutlet UIButton *wechatShareBtn;
@property (strong, nonatomic) IBOutlet UIButton *wcCircleShareBtn; //@property (strong, nonatomic) IBOutlet UIButton *wcCircleShareBtn;
@property (strong, nonatomic) IBOutlet UILabel *titleLabel; @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
...@@ -101,11 +101,12 @@ ...@@ -101,11 +101,12 @@
shareType = FUSVideoStartShareTypeTwitter; shareType = FUSVideoStartShareTypeTwitter;
} else if (self.lineShareBtn.isSelected) { } else if (self.lineShareBtn.isSelected) {
shareType = FUSVideoStartShareTypeLine; shareType = FUSVideoStartShareTypeLine;
} else if (self.wechatShareBtn.isSelected) { }
shareType = FUSVideoStartShareTypeWeChat; // else if (self.wechatShareBtn.isSelected) {
} else if (self.wcCircleShareBtn.isSelected) { // shareType = FUSVideoStartShareTypeWeChat;
shareType = FUSVideoStartShareTypeWeChatCircle; // } else if (self.wcCircleShareBtn.isSelected) {
} // shareType = FUSVideoStartShareTypeWeChatCircle;
// }
FUSLiveRoomScopeType scopeType = FUSLiveRoomScopeTypeOpen; FUSLiveRoomScopeType scopeType = FUSLiveRoomScopeTypeOpen;
if (self.scopeFollowBtn.isSelected) { if (self.scopeFollowBtn.isSelected) {
...@@ -145,9 +146,9 @@ ...@@ -145,9 +146,9 @@
BOOL selected = !sender.isSelected; BOOL selected = !sender.isSelected;
self.facebookShareBtn.selected = NO; self.facebookShareBtn.selected = NO;
self.lineShareBtn.selected = NO; self.lineShareBtn.selected = NO;
self.wechatShareBtn.selected = NO; // self.wechatShareBtn.selected = NO;
self.twitterShareBtn.selected = NO; self.twitterShareBtn.selected = NO;
self.wcCircleShareBtn.selected = NO; // self.wcCircleShareBtn.selected = NO;
sender.selected = selected; sender.selected = selected;
} }
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<rect key="frame" x="0.0" y="392" width="405" height="32"/> <rect key="frame" x="0.0" y="392" width="405" height="32"/>
<subviews> <subviews>
<button opaque="NO" tag="1" contentMode="scaleAspectFit" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mBV-p9-Cwf"> <button opaque="NO" tag="1" contentMode="scaleAspectFit" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mBV-p9-Cwf">
<rect key="frame" x="245" y="0.0" width="32" height="32"/> <rect key="frame" x="309" y="0.0" width="32" height="32"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="mBV-p9-Cwf" secondAttribute="height" multiplier="1:1" id="xFI-Ns-703"/> <constraint firstAttribute="width" secondItem="mBV-p9-Cwf" secondAttribute="height" multiplier="1:1" id="xFI-Ns-703"/>
</constraints> </constraints>
...@@ -155,30 +155,8 @@ ...@@ -155,30 +155,8 @@
<action selector="clickShareBtnAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="1wE-i9-cxm"/> <action selector="clickShareBtnAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="1wE-i9-cxm"/>
</connections> </connections>
</button> </button>
<button opaque="NO" tag="4" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hax-4z-Ra6">
<rect key="frame" x="373" y="0.0" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" secondItem="Hax-4z-Ra6" secondAttribute="height" multiplier="1:1" id="HdX-DE-CIs"/>
</constraints>
<state key="normal" image="live_start_share_wx_circle"/>
<state key="selected" image="live_start_share_wx_circle_selected"/>
<connections>
<action selector="clickShareBtnAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Khu-Pa-DZs"/>
</connections>
</button>
<button opaque="NO" tag="3" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nbP-M5-7px">
<rect key="frame" x="341" y="0.0" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" secondItem="nbP-M5-7px" secondAttribute="height" multiplier="1:1" id="SfG-U4-9nT"/>
</constraints>
<state key="normal" image="live_start_share_wechat"/>
<state key="selected" image="live_start_share_wechat_selected"/>
<connections>
<action selector="clickShareBtnAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="0XA-95-lKC"/>
</connections>
</button>
<button opaque="NO" tag="2" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iSB-WR-aap"> <button opaque="NO" tag="2" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iSB-WR-aap">
<rect key="frame" x="277" y="0.0" width="32" height="32"/> <rect key="frame" x="341" y="0.0" width="32" height="32"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="iSB-WR-aap" secondAttribute="height" multiplier="1:1" id="vlG-31-Yig"/> <constraint firstAttribute="width" secondItem="iSB-WR-aap" secondAttribute="height" multiplier="1:1" id="vlG-31-Yig"/>
</constraints> </constraints>
...@@ -189,7 +167,7 @@ ...@@ -189,7 +167,7 @@
</connections> </connections>
</button> </button>
<button opaque="NO" tag="2" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gPb-3Y-YG4"> <button opaque="NO" tag="2" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gPb-3Y-YG4">
<rect key="frame" x="309" y="0.0" width="32" height="32"/> <rect key="frame" x="373" y="0.0" width="32" height="32"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="gPb-3Y-YG4" secondAttribute="height" multiplier="1:1" id="4l9-24-sIs"/> <constraint firstAttribute="width" secondItem="gPb-3Y-YG4" secondAttribute="height" multiplier="1:1" id="4l9-24-sIs"/>
<constraint firstAttribute="width" secondItem="gPb-3Y-YG4" secondAttribute="height" multiplier="1:1" id="X89-GA-rMo"/> <constraint firstAttribute="width" secondItem="gPb-3Y-YG4" secondAttribute="height" multiplier="1:1" id="X89-GA-rMo"/>
...@@ -207,18 +185,12 @@ ...@@ -207,18 +185,12 @@
<constraint firstAttribute="bottom" secondItem="iSB-WR-aap" secondAttribute="bottom" id="4Io-ej-Fhk"/> <constraint firstAttribute="bottom" secondItem="iSB-WR-aap" secondAttribute="bottom" id="4Io-ej-Fhk"/>
<constraint firstItem="gPb-3Y-YG4" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="En9-Ik-wGX"/> <constraint firstItem="gPb-3Y-YG4" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="En9-Ik-wGX"/>
<constraint firstItem="mBV-p9-Cwf" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="GYb-hx-ky2"/> <constraint firstItem="mBV-p9-Cwf" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="GYb-hx-ky2"/>
<constraint firstAttribute="bottom" secondItem="Hax-4z-Ra6" secondAttribute="bottom" id="Jym-iY-i5f"/>
<constraint firstItem="nbP-M5-7px" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="PuB-nY-A5k"/>
<constraint firstItem="nbP-M5-7px" firstAttribute="leading" secondItem="gPb-3Y-YG4" secondAttribute="trailing" id="VZI-fY-xbL"/>
<constraint firstItem="Hax-4z-Ra6" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="aB4-vI-yEY"/>
<constraint firstItem="iSB-WR-aap" firstAttribute="leading" secondItem="mBV-p9-Cwf" secondAttribute="trailing" id="aO6-jf-aZD"/> <constraint firstItem="iSB-WR-aap" firstAttribute="leading" secondItem="mBV-p9-Cwf" secondAttribute="trailing" id="aO6-jf-aZD"/>
<constraint firstAttribute="bottom" secondItem="mBV-p9-Cwf" secondAttribute="bottom" id="f6R-qJ-jW7"/> <constraint firstAttribute="bottom" secondItem="mBV-p9-Cwf" secondAttribute="bottom" id="f6R-qJ-jW7"/>
<constraint firstAttribute="trailing" secondItem="Hax-4z-Ra6" secondAttribute="trailing" id="fBT-5k-mgy"/>
<constraint firstItem="iSB-WR-aap" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="t41-O6-3dp"/> <constraint firstItem="iSB-WR-aap" firstAttribute="top" secondItem="NU6-oh-N2C" secondAttribute="top" id="t41-O6-3dp"/>
<constraint firstAttribute="height" constant="32" id="tV2-as-DhX"/> <constraint firstAttribute="height" constant="32" id="tV2-as-DhX"/>
<constraint firstAttribute="bottom" secondItem="nbP-M5-7px" secondAttribute="bottom" id="vcs-t1-z5h"/>
<constraint firstItem="gPb-3Y-YG4" firstAttribute="leading" secondItem="iSB-WR-aap" secondAttribute="trailing" id="vun-vx-gHP"/> <constraint firstItem="gPb-3Y-YG4" firstAttribute="leading" secondItem="iSB-WR-aap" secondAttribute="trailing" id="vun-vx-gHP"/>
<constraint firstItem="Hax-4z-Ra6" firstAttribute="leading" secondItem="nbP-M5-7px" secondAttribute="trailing" id="xqe-nx-9P4"/> <constraint firstAttribute="trailing" secondItem="gPb-3Y-YG4" secondAttribute="trailing" id="xgj-2i-Cpm"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
...@@ -249,8 +221,6 @@ ...@@ -249,8 +221,6 @@
<outlet property="startLiveBtn" destination="yWH-ry-ezq" id="Pgh-JP-l3g"/> <outlet property="startLiveBtn" destination="yWH-ry-ezq" id="Pgh-JP-l3g"/>
<outlet property="titleLabel" destination="oq4-1B-4Bm" id="SSS-RS-n25"/> <outlet property="titleLabel" destination="oq4-1B-4Bm" id="SSS-RS-n25"/>
<outlet property="twitterShareBtn" destination="iSB-WR-aap" id="OTK-bu-y5J"/> <outlet property="twitterShareBtn" destination="iSB-WR-aap" id="OTK-bu-y5J"/>
<outlet property="wcCircleShareBtn" destination="Hax-4z-Ra6" id="KiJ-R2-9Yi"/>
<outlet property="wechatShareBtn" destination="nbP-M5-7px" id="Oj7-Fi-SF9"/>
</connections> </connections>
<point key="canvasLocation" x="141" y="145"/> <point key="canvasLocation" x="141" y="145"/>
</view> </view>
...@@ -268,9 +238,5 @@ ...@@ -268,9 +238,5 @@
<image name="live_start_share_line_selected" width="19" height="19"/> <image name="live_start_share_line_selected" width="19" height="19"/>
<image name="live_start_share_twitter" width="19" height="19"/> <image name="live_start_share_twitter" width="19" height="19"/>
<image name="live_start_share_twitter_selected" width="19" height="19"/> <image name="live_start_share_twitter_selected" width="19" height="19"/>
<image name="live_start_share_wechat" width="19.666666030883789" height="19"/>
<image name="live_start_share_wechat_selected" width="19.666666030883789" height="19"/>
<image name="live_start_share_wx_circle" width="19.666666030883789" height="19"/>
<image name="live_start_share_wx_circle_selected" width="19.666666030883789" height="19"/>
</resources> </resources>
</document> </document>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
[FUSNewsFeedHttpHelper fus_requestDynamicLikeListWithTopicId:_topicId commentId:_commentId page:self.page success:^(NSArray * _Nonnull likeList, NSInteger likeTotal) { [FUSNewsFeedHttpHelper fus_requestDynamicLikeListWithTopicId:_topicId commentId:_commentId page:self.page success:^(NSArray * _Nonnull likeList, NSInteger likeTotal) {
if (_page == 1) { if (self.page == 1) {
[self.likeList removeAllObjects]; [self.likeList removeAllObjects];
} }
[self.likeList addObjectsFromArray:likeList]; [self.likeList addObjectsFromArray:likeList];
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
NSDictionary *privilege = likeUser.privilege; NSDictionary *privilege = likeUser.privilege;
NSInteger level = [privilege[@"richPower"] integerValue] == 1 ? likeUser.richLevel : 0; NSInteger level = [privilege[@"richPower"] integerValue] == 1 ? likeUser.richLevel : 0;
cell.iconView.faceImageView.image = [UIImage imageNamed:@"icon_head_default"]; cell.iconView.faceImageView.image = [UIImage imageNamed:@"icon_head_default"];
[cell.iconView fus_setupIconWithFacePath:face level:level hiddenLevel:NO]; [cell.iconView fus_setupIconWithFacePath:face level:level];
cell.iconView.hidden = NO; cell.iconView.hidden = NO;
cell.totalCountLabel.hidden = YES; cell.totalCountLabel.hidden = YES;
} else { } else {
......
...@@ -20,18 +20,19 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -20,18 +20,19 @@ NS_ASSUME_NONNULL_BEGIN
// 富豪等级挂件 // 富豪等级挂件
@property (nonatomic, strong) UIImageView *richWearImageView; @property (nonatomic, strong) UIImageView *richWearImageView;
/// 是否显示未获得vip的灰色图片
@property (nonatomic, assign) BOOL showNoVipLevel;
/// 设置直播间内的富豪等级头像 /// 设置直播间内的富豪等级头像
/// @param facePath 富豪等级头像 /// @param facePath 富豪等级头像
/// @param level 等级 /// @param level 等级
- (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level; - (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level;
- (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level hiddenLevel:(BOOL)hiddenLevel animated:(BOOL)animated; - (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level animated:(BOOL)animated;
- (void)fus_setupIconWithImage:(UIImage *)faceImage level:(NSInteger)level animated:(BOOL)animated; - (void)fus_setupIconWithImage:(UIImage *)faceImage level:(NSInteger)level animated:(BOOL)animated;
- (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level;
- (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level hiddenLevel:(BOOL)hiddenLevel; - (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level;
- (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level hiddenLevel:(BOOL)hiddenLevel animated:(BOOL)animated; - (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level animated:(BOOL)animated;
@end @end
......
...@@ -78,43 +78,38 @@ static CGFloat const kBaseSize = 40.0f; ...@@ -78,43 +78,38 @@ static CGFloat const kBaseSize = 40.0f;
- (void)fus_setupIconWithImage:(UIImage *)faceImage level:(NSInteger)level animated:(BOOL)animated { - (void)fus_setupIconWithImage:(UIImage *)faceImage level:(NSInteger)level animated:(BOOL)animated {
self.faceImageView.image = faceImage; self.faceImageView.image = faceImage;
[self fus_setupWithLevel:level hiddenLevel:NO animated:YES]; [self fus_setupWithLevel:level animated:YES];
} }
- (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level { - (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level {
[self fus_setupLiveIconWithFacePath:facePath level:level hiddenLevel:NO animated:YES]; [self fus_setupLiveIconWithFacePath:facePath level:level animated:YES];
} }
- (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level hiddenLevel:(BOOL)hiddenLevel animated:(BOOL)animated { - (void)fus_setupLiveIconWithFacePath:(NSString *)facePath level:(NSInteger)level animated:(BOOL)animated {
if ([facePath containsString:@"boy"] || if ([facePath containsString:@"boy"] ||
[facePath containsString:@"girl"]) { [facePath containsString:@"girl"]) {
[self fus_setupIconWithImage:[UIImage imageNamed:@"live_default_head_bg"] level:level animated:animated]; [self fus_setupIconWithImage:[UIImage imageNamed:@"live_default_head_bg"] level:level animated:animated];
} else { } else {
[self fus_setupIconWithFacePath:facePath level:level hiddenLevel:hiddenLevel animated:animated]; [self fus_setupIconWithFacePath:facePath level:level animated:animated];
} }
} }
- (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level { - (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level {
[self fus_setupIconWithFacePath:facePath level:level hiddenLevel:NO]; [self fus_setupIconWithFacePath:facePath level:level];
}
- (void)fus_setupIconWithFacePath:(NSString *)facePath level:(NSInteger)level hiddenLevel:(BOOL)hiddenLevel {
[self fus_setupIconWithFacePath:facePath level:level hiddenLevel:hiddenLevel animated:YES];
} }
- (void)fus_setupIconWithFacePath:(NSString *)facePath - (void)fus_setupIconWithFacePath:(NSString *)facePath
level:(NSInteger)level level:(NSInteger)level
hiddenLevel:(BOOL)hiddenLevel
animated:(BOOL)animated { animated:(BOOL)animated {
[self.faceImageView setWebImageWithSubURLString:facePath placeholder:nil]; [self.faceImageView setWebImageWithSubURLString:facePath placeholder:nil];
[self fus_setupWithLevel:level hiddenLevel:hiddenLevel animated:animated]; [self fus_setupWithLevel:level animated:animated];
} }
- (void)fus_setupWithLevel:(NSInteger)level hiddenLevel:(BOOL)hiddenLevel animated:(BOOL)animated { - (void)fus_setupWithLevel:(NSInteger)level animated:(BOOL)animated {
UIImage *image = [UIImage fus_imageWithLevel:level]; UIImage *image = [UIImage fus_imageWithLevel:level];
_richWearImageView.hidden = (image == nil) || (level <= 0 && !self.showNoVipLevel);
_richWearImageView.image = image; _richWearImageView.image = image;
_richWearImageView.hidden = (image == nil);
} }
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment