Commit 5c45013c by pierce

fixed bugs

parent c7d02c45
Showing with 253 additions and 178 deletions
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bind_agent_info_alert_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bind_agent_info_alert_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,8 +5,8 @@
"scale" : "1x"
},
{
"filename" : "翻轉鏡頭@2x.png",
"idiom" : "universal",
"filename" : "单播-反转镜头@2x.png",
"scale" : "2x"
},
{
......@@ -15,7 +15,7 @@
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,8 +5,8 @@
"scale" : "1x"
},
{
"filename" : "美顏設置@2x.png",
"idiom" : "universal",
"filename" : "单播-美颜图标@2x.png",
"scale" : "2x"
},
{
......@@ -15,7 +15,7 @@
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -5,8 +5,8 @@
"scale" : "1x"
},
{
"filename" : "閃光開啓@2x.png",
"idiom" : "universal",
"filename" : "单播-闪光灯开始图标@2x.png",
"scale" : "2x"
},
{
......@@ -15,7 +15,7 @@
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
......@@ -439,6 +439,9 @@
#define URL_RANK_ROOM_DEVOTE_GET DNS_FUS_API(@"/rank/room/devote/get")
// Fusi-获取房间真实用户列表
#define URL_Live_Real_Users_GetList DNS_FUS_API(@"/live/real/users/getList")
#define URL_ROOM_Interact_Game_List DNS_FUS_API(@"/room/queryInteractGameList")
#define URL_ROOM_Set_Live_Game_Switch DNS_FUS_API(@"/personal/liveGame/switch/set")
......
......@@ -59,7 +59,7 @@
#define ADDFRIENDVIEW_H 50
@interface FUSChatDetailViewController ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate,UINavigationBarDelegate,FUSIMChatServiceDelegate,FUSIMMoreButtonViewDelegate,FUSImagePickerViewControllerDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,FUSIMGiftViewDelegate,FUSIMChatDetailCellDelegate,FUSIMChatAudioManagerDelegate>
@interface FUSChatDetailViewController ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate,UINavigationBarDelegate,FUSIMChatServiceDelegate,FUSIMMoreButtonViewDelegate,FUSImagePickerViewControllerDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,FUSIMGiftViewDelegate,FUSIMChatDetailCellDelegate,FUSIMChatAudioManagerDelegate,UIGestureRecognizerDelegate>
/**
会话的名称
......@@ -255,6 +255,9 @@
_tableView.estimatedRowHeight = 0;
// 关闭点击状态栏滚动到顶部
_tableView.scrollsToTop = NO;
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_endEditState)];
tapGesture.delegate = self;
[_tableView addGestureRecognizer:tapGesture];
}
return _tableView;
}
......@@ -1880,6 +1883,14 @@
}];
}
#pragma mark - UIGestureRecognizerDelegate
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([touch.view isKindOfClass:[YYLabel class]]) {
return NO;
}
return YES;
}
#pragma mark - UIResponderStandardEditActions
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
......
......@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -12,17 +13,17 @@
<rect key="frame" x="0.0" y="0.0" width="120" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="KQz-1K-J4b">
<rect key="frame" x="47" y="27" width="26" height="26"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="video_chat_camera" translatesAutoresizingMaskIntoConstraints="NO" id="KQz-1K-J4b">
<rect key="frame" x="42.5" y="22.5" width="35" height="35"/>
<constraints>
<constraint firstAttribute="height" constant="26" id="nOf-rB-Usy"/>
<constraint firstAttribute="height" constant="35" id="nOf-rB-Usy"/>
<constraint firstAttribute="width" secondItem="KQz-1K-J4b" secondAttribute="height" multiplier="1:1" id="qga-1c-9LG"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t2W-c0-yCI">
<rect key="frame" x="43.5" y="53" width="33" height="16"/>
<rect key="frame" x="43.5" y="63.5" width="33" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wnh-4U-cjf">
......@@ -37,7 +38,7 @@
<constraint firstAttribute="trailing" secondItem="Wnh-4U-cjf" secondAttribute="trailing" id="4gl-Rb-4Gp"/>
<constraint firstItem="Wnh-4U-cjf" firstAttribute="leading" secondItem="5pF-fe-eJh" secondAttribute="leading" id="7xQ-fo-FtP"/>
<constraint firstItem="Wnh-4U-cjf" firstAttribute="top" secondItem="5pF-fe-eJh" secondAttribute="top" id="DgV-Ms-3Zm"/>
<constraint firstItem="t2W-c0-yCI" firstAttribute="top" secondItem="KQz-1K-J4b" secondAttribute="bottom" id="K5C-xc-eLo"/>
<constraint firstItem="t2W-c0-yCI" firstAttribute="top" secondItem="KQz-1K-J4b" secondAttribute="bottom" constant="6" id="K5C-xc-eLo"/>
<constraint firstItem="KQz-1K-J4b" firstAttribute="centerY" secondItem="5pF-fe-eJh" secondAttribute="centerY" constant="-10" id="YSR-Bv-x42"/>
<constraint firstAttribute="bottom" secondItem="Wnh-4U-cjf" secondAttribute="bottom" id="ova-Cu-LSx"/>
<constraint firstItem="t2W-c0-yCI" firstAttribute="centerX" secondItem="5pF-fe-eJh" secondAttribute="centerX" id="q0A-bY-uSl"/>
......@@ -51,4 +52,7 @@
<point key="canvasLocation" x="-1539.2" y="73.763118440779621"/>
</view>
</objects>
<resources>
<image name="video_chat_camera" width="40" height="40"/>
</resources>
</document>
......@@ -28,7 +28,8 @@
}
- (void)fus_setupUI {
self.backgroundColor = [[UIColor colorWithHex:@"#1A1A24"] colorWithAlphaComponent:0.9];
self.backgroundColor = [UIColor fus_appBGColor];
[self addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(12, 12)];
NSArray *typeArr = @[@(FUSVideoChatSettingTypeSkinBeauty),@(FUSVideoChatSettingTypeThunderLight),@(FUSVideoChatSettingTypeCamera)];
_itemArray = [NSMutableArray arrayWithCapacity:typeArr.count];
CGFloat itemWidth = UIView.fus_screenW / 3.0;
......
......@@ -24,15 +24,9 @@
///经纪人名字
@property (weak, nonatomic) IBOutlet UILabel *agentNameLabel;
//经纪人名字是否获取成功
//@property (nonatomic, assign) BOOL agentResultSuccess;
//弹框的标题
@property (weak, nonatomic) IBOutlet UILabel *tipsTitleLbael;
//弹框的说明
@property (weak, nonatomic) IBOutlet UILabel *tipsDetailLabel;
//取消
@property (weak, nonatomic) IBOutlet UIButton *cancelBtn;
......@@ -65,18 +59,16 @@
}
- (void)initUI{
_confirmBtn.style = FUSButtonStyleBlue;
// _agentResultSuccess = YES;
_confirmBtn.style = FUSButtonStyleBlue;
_agentNameLabel.text = @" ";
_tipsTitleLbael.text = FUSLocalizationHelper.localString(@"输入朋友的邀请码");
_tipsDetailLabel.text = FUSLocalizationHelper.localString(@"输入邀请码和好友联系更紧密");
[_confirmBtn setTitle:FUSLocalizationHelper.localString(@"确定") forState:UIControlStateNormal];
[_cancelBtn setTitle:FUSLocalizationHelper.localString(@"不用了") forState:UIControlStateNormal];
NSAttributedString *holderAttr = [[NSAttributedString alloc] initWithString:FUSLocalizationHelper.localString(@"输入邀请码(选填)") attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#8C8C8C"]}];
NSAttributedString *holderAttr = [[NSAttributedString alloc] initWithString:FUSLocalizationHelper.localString(@"输入邀请码(选填)") attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#BEBEBE"]}];
_agentIdTextfield.attributedPlaceholder = holderAttr;
_agentIdTextfield.returnKeyType = UIReturnKeyDone;
_agentIdTextfield.delegate = self;
......@@ -85,7 +77,6 @@
_agentIdTextfield.layer.borderWidth = 1.0;
_agentIdTextfield.layer.cornerRadius = 5.0;
_agentIdTextfield.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 0);
_agentIdTextfield.layer.borderColor = [UIColor colorWithHex:@"#8C8C8C"].CGColor;
// 注册 TextField DidChange 通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(recieveTextFieldDidChangeNotification:) name:UITextFieldTextDidChangeNotification object:nil];
......@@ -126,16 +117,16 @@
// __weak typeof(self) weakSelf = self;
[FUSLoginHttpHelper fus_bindAgentWithID:_agentIdTextfield.text success:^{
if ([NSString isNull:_agentName]) {
if ([NSString isNull:self.agentName]) {
[self fus_requestAgentInfoSuccess:^(NSString *name) {
// 显示绑定弹窗
[[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:name brokerID:_agentIdTextfield.text] fus_show];
[[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:name brokerID:self.agentIdTextfield.text] fus_show];
} failure:^(NSString *msg, int code) {
[FUSDialogView fus_showDialog:msg];
}];
}else {
// 显示绑定弹窗
[[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:_agentName brokerID:_agentIdTextfield.text] fus_show];
[[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:self.agentName brokerID:self.agentIdTextfield.text] fus_show];
}
......@@ -202,16 +193,16 @@
- (void)fus_getAgentName {
[FUSLoginHttpHelper fus_getAgentNameWithID:_agentIdTextfield.text success:^(NSString *name) {
_agentName = name;
_agentNameLabel.textColor = [UIColor whiteColor];
_agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name];
self.agentName = name;
self.agentNameLabel.textColor = [UIColor whiteColor];
self.agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name];
// _agentResultSuccess = YES;
} failure:^(NSString *msg, int code) {
_agentName = nil;
self.agentName = nil;
//没有找到用户
if (code == -11) {
_agentNameLabel.textColor = [UIColor redColor];
_agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人");
self.agentNameLabel.textColor = [UIColor redColor];
self.agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人");
}
// _agentResultSuccess = NO;
}];
......@@ -222,17 +213,16 @@
*/
- (void)fus_requestAgentInfoSuccess:(void (^)(NSString *name))success failure:(void (^)(NSString *msg, int code))failure{
[FUSLoginHttpHelper fus_getAgentNameWithID:_agentIdTextfield.text success:^(NSString *name) {
_agentName = name;
_agentNameLabel.textColor = [UIColor whiteColor];
_agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name];
// _agentResultSuccess = YES;
self.agentName = name;
self.agentNameLabel.textColor = [UIColor whiteColor];
self.agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name];
if (success) success(name);
} failure:^(NSString *msg, int code) {
_agentName = nil;
self.agentName = nil;
//没有找到用户
if (code == -11) {
_agentNameLabel.textColor = [UIColor redColor];
_agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人");
self.agentNameLabel.textColor = [UIColor redColor];
self.agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人");
}
if (failure) failure(msg,code);
// _agentResultSuccess = NO;
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -17,45 +15,38 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sng-JN-2li">
<rect key="frame" x="59.666666666666657" y="276" width="295" height="344"/>
<rect key="frame" x="67.666666666666686" y="303" width="279" height="290"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_bind_agent_tips_bgView" translatesAutoresizingMaskIntoConstraints="NO" id="5DV-7N-KVP">
<rect key="frame" x="0.0" y="0.0" width="295" height="344"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="输入朋友的邀请码" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KFR-gx-f4I">
<rect key="frame" x="30" y="105" width="235" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<rect key="frame" x="30" y="92" width="219" height="24"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="17"/>
<color key="textColor" red="0.15686274509803921" green="0.15686274509803921" blue="0.15686274509803921" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="邀请码无效" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C0B-Wx-GTA">
<rect key="frame" x="30" y="136" width="235" height="16"/>
<rect key="frame" x="20" y="121.33333333333333" width="239" height="15.666666666666671"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="0.14913141730000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="输入邀请码" textAlignment="natural" clearsOnBeginEditing="YES" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="PJI-Pw-6R8" customClass="FUSTextField">
<rect key="frame" x="30" y="162" width="235" height="38"/>
<color key="backgroundColor" red="0.12549019607843137" green="0.20392156862745098" blue="0.32549019607843138" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<rect key="frame" x="20" y="139" width="239" height="38"/>
<color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.93725490196078431" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="xTW-qy-VAl"/>
</constraints>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="11:59:39内有效" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qpc-nQ-gP0">
<rect key="frame" x="30" y="205" width="235" height="13.333333333333343"/>
<rect key="frame" x="20" y="182" width="239" height="13"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lKf-fe-iLZ" customClass="FUSStyleButton">
<rect key="frame" x="97.333333333333343" y="223.33333333333331" width="100" height="38"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="YPo-kr-EQY"/>
<constraint firstAttribute="height" constant="38" id="mfc-q0-Ixs"/>
</constraints>
<rect key="frame" x="144.33333333333331" y="221" width="120.66666666666669" height="46"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="确定"/>
<connections>
......@@ -63,57 +54,69 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IrS-zU-dtx">
<rect key="frame" x="97.333333333333343" y="266.33333333333337" width="100" height="38"/>
<rect key="frame" x="13.999999999999993" y="221" width="120.33333333333331" height="46"/>
<color key="backgroundColor" red="0.89803921568627454" green="0.89803921568627454" blue="0.89803921568627454" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="GFY-nx-JR0"/>
<constraint firstAttribute="width" constant="100" id="gO6-x5-LOT"/>
<constraint firstAttribute="height" constant="46" id="Syg-hW-KhA"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="不用了">
<color key="titleColor" red="0.34509803921568627" green="0.85882352941176465" blue="0.84313725490196079" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="onClickRemoveView:" destination="iN0-l3-epB" eventType="touchUpInside" id="g8L-Ut-Q7H"/>
</connections>
</button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bind_agent_info_alert_icon" translatesAutoresizingMaskIntoConstraints="NO" id="T4C-rk-qJO">
<rect key="frame" x="103" y="31" width="73" height="45"/>
<constraints>
<constraint firstAttribute="width" constant="73" id="4AS-tv-83G"/>
<constraint firstAttribute="height" constant="45" id="dcM-Me-3Zl"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="PJI-Pw-6R8" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" constant="30" id="2Wl-28-7Qu"/>
<constraint firstAttribute="bottom" secondItem="5DV-7N-KVP" secondAttribute="bottom" id="3op-ja-Ust"/>
<constraint firstItem="lKf-fe-iLZ" firstAttribute="height" secondItem="IrS-zU-dtx" secondAttribute="height" id="2Th-Ra-Moc"/>
<constraint firstItem="PJI-Pw-6R8" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" constant="20" id="2Wl-28-7Qu"/>
<constraint firstItem="T4C-rk-qJO" firstAttribute="centerX" secondItem="Sng-JN-2li" secondAttribute="centerX" id="5ws-zk-IBZ"/>
<constraint firstItem="KFR-gx-f4I" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" constant="30" id="6hJ-jV-3tL"/>
<constraint firstItem="PJI-Pw-6R8" firstAttribute="centerX" secondItem="Sng-JN-2li" secondAttribute="centerX" id="7WR-Kz-fzg"/>
<constraint firstAttribute="height" constant="344" id="CaR-t5-wTv"/>
<constraint firstItem="KFR-gx-f4I" firstAttribute="top" secondItem="T4C-rk-qJO" secondAttribute="bottom" constant="16" id="76F-eg-pdi"/>
<constraint firstItem="Qpc-nQ-gP0" firstAttribute="trailing" secondItem="PJI-Pw-6R8" secondAttribute="trailing" id="9Fm-nu-9PC"/>
<constraint firstItem="PJI-Pw-6R8" firstAttribute="top" secondItem="KFR-gx-f4I" secondAttribute="bottom" constant="23" id="AxZ-cP-I3D"/>
<constraint firstAttribute="height" constant="290" id="CaR-t5-wTv"/>
<constraint firstAttribute="trailing" secondItem="KFR-gx-f4I" secondAttribute="trailing" constant="30" id="H29-mm-4aH"/>
<constraint firstItem="Qpc-nQ-gP0" firstAttribute="top" secondItem="PJI-Pw-6R8" secondAttribute="bottom" constant="5" id="K2e-XR-ABv"/>
<constraint firstItem="5DV-7N-KVP" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" id="UbL-sI-GCj"/>
<constraint firstItem="C0B-Wx-GTA" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" constant="30" id="WQh-Th-23W"/>
<constraint firstItem="lKf-fe-iLZ" firstAttribute="centerX" secondItem="Sng-JN-2li" secondAttribute="centerX" id="Yxf-NS-Vkc"/>
<constraint firstAttribute="width" constant="295" id="Zjd-uX-h4E"/>
<constraint firstItem="Qpc-nQ-gP0" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" constant="30" id="cdc-Bq-hGr"/>
<constraint firstItem="5DV-7N-KVP" firstAttribute="top" secondItem="Sng-JN-2li" secondAttribute="top" id="gqg-Bv-TIT"/>
<constraint firstItem="KFR-gx-f4I" firstAttribute="top" secondItem="Sng-JN-2li" secondAttribute="top" constant="105" id="h3o-IO-DPW"/>
<constraint firstItem="IrS-zU-dtx" firstAttribute="top" secondItem="lKf-fe-iLZ" secondAttribute="bottom" constant="5" id="iCa-5Y-Bdm"/>
<constraint firstItem="PJI-Pw-6R8" firstAttribute="top" secondItem="C0B-Wx-GTA" secondAttribute="bottom" constant="10" id="iyD-Yg-aiR"/>
<constraint firstAttribute="trailing" secondItem="C0B-Wx-GTA" secondAttribute="trailing" constant="30" id="kM1-lv-Ky9"/>
<constraint firstItem="C0B-Wx-GTA" firstAttribute="top" secondItem="KFR-gx-f4I" secondAttribute="bottom" constant="10" id="nIu-iy-JHS"/>
<constraint firstAttribute="trailing" secondItem="Qpc-nQ-gP0" secondAttribute="trailing" constant="30" id="s1v-iL-Oy7"/>
<constraint firstAttribute="trailing" secondItem="5DV-7N-KVP" secondAttribute="trailing" id="tMh-sb-uf0"/>
<constraint firstItem="lKf-fe-iLZ" firstAttribute="top" secondItem="Qpc-nQ-gP0" secondAttribute="bottom" constant="5" id="uAf-5k-DCD"/>
<constraint firstAttribute="trailing" secondItem="PJI-Pw-6R8" secondAttribute="trailing" constant="30" id="uXL-nS-iU1"/>
<constraint firstItem="Qpc-nQ-gP0" firstAttribute="centerX" secondItem="Sng-JN-2li" secondAttribute="centerX" id="xDd-eC-MWY"/>
<constraint firstItem="IrS-zU-dtx" firstAttribute="centerX" secondItem="Sng-JN-2li" secondAttribute="centerX" id="yna-om-xqH"/>
<constraint firstItem="T4C-rk-qJO" firstAttribute="top" secondItem="Sng-JN-2li" secondAttribute="top" constant="31" id="S8g-Hg-R15"/>
<constraint firstItem="C0B-Wx-GTA" firstAttribute="leading" secondItem="PJI-Pw-6R8" secondAttribute="leading" id="X3V-1n-75t"/>
<constraint firstAttribute="bottom" secondItem="IrS-zU-dtx" secondAttribute="bottom" constant="23" id="XlO-VA-QM6"/>
<constraint firstAttribute="width" constant="279" id="Zjd-uX-h4E"/>
<constraint firstItem="PJI-Pw-6R8" firstAttribute="top" secondItem="C0B-Wx-GTA" secondAttribute="bottom" constant="2" id="iyD-Yg-aiR"/>
<constraint firstItem="IrS-zU-dtx" firstAttribute="leading" secondItem="Sng-JN-2li" secondAttribute="leading" constant="14" id="lXl-Tx-MDy"/>
<constraint firstItem="Qpc-nQ-gP0" firstAttribute="leading" secondItem="PJI-Pw-6R8" secondAttribute="leading" id="lmJ-Z9-rfG"/>
<constraint firstItem="lKf-fe-iLZ" firstAttribute="leading" secondItem="IrS-zU-dtx" secondAttribute="trailing" constant="10" id="m5s-bf-O6o"/>
<constraint firstItem="lKf-fe-iLZ" firstAttribute="top" secondItem="IrS-zU-dtx" secondAttribute="top" id="olf-23-oil"/>
<constraint firstAttribute="trailing" secondItem="lKf-fe-iLZ" secondAttribute="trailing" constant="14" id="pdK-yJ-rD7"/>
<constraint firstAttribute="trailing" secondItem="PJI-Pw-6R8" secondAttribute="trailing" constant="20" id="uXL-nS-iU1"/>
<constraint firstItem="C0B-Wx-GTA" firstAttribute="centerX" secondItem="Sng-JN-2li" secondAttribute="centerX" id="z7K-iJ-8Sx"/>
<constraint firstItem="lKf-fe-iLZ" firstAttribute="width" secondItem="IrS-zU-dtx" secondAttribute="width" id="zIn-EB-PP8"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="16"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sO5-6f-bgb">
<rect key="frame" x="194" y="625" width="26" height="26"/>
<rect key="frame" x="194" y="598" width="26" height="26"/>
<state key="normal" image="common_bind_agent_tips_bgView_close"/>
<connections>
<action selector="onClickRemoveView:" destination="iN0-l3-epB" eventType="touchUpInside" id="S1J-Qu-BBe"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="0.0" alpha="0.18784781678082191" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="sO5-6f-bgb" firstAttribute="top" secondItem="Sng-JN-2li" secondAttribute="bottom" constant="5" id="6Ih-eI-Uua"/>
......@@ -121,7 +124,6 @@
<constraint firstItem="sO5-6f-bgb" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="gL3-NG-2YF"/>
<constraint firstItem="Sng-JN-2li" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="tQB-BU-s9u"/>
</constraints>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<connections>
<outlet property="agentIdTextfield" destination="PJI-Pw-6R8" id="o4q-0u-8BI"/>
<outlet property="agentNameLabel" destination="C0B-Wx-GTA" id="SRk-mO-Gfi"/>
......@@ -134,7 +136,7 @@
</view>
</objects>
<resources>
<image name="common_bind_agent_tips_bgView" width="295" height="344"/>
<image name="bind_agent_info_alert_icon" width="70" height="43.666667938232422"/>
<image name="common_bind_agent_tips_bgView_close" width="26" height="26"/>
</resources>
</document>
......@@ -37,7 +37,7 @@
/// 拥有宝石(0:无、1:有)
@property (nonatomic, assign) BOOL haveGem;
/// 添加的时间
@property (nonatomic, assign) NSInteger addedTime;
/// 加入时间戳
@property (nonatomic, assign) NSInteger addTimestamp;
@end
......@@ -13,7 +13,7 @@
- (instancetype)init {
self = [super init];
if (self) {
_addedTime = [NSDate date].timeIntervalSince1970 * 1000;
_addTimestamp = [NSDate date].timeIntervalSince1970 * 1000;
}
return self;
}
......
......@@ -206,6 +206,7 @@
[self.faceImageView setWebImageWithSubURLString:contributeModel.face];
self.nicknameLabel.text = contributeModel.nickname;
self.firstLoveImageView.hidden = YES;
BOOL ishide = contributeModel.isHide;
if (ishide) {
......@@ -241,8 +242,6 @@
if ([contributeModel.privilege[@"firstChargePower"] integerValue] == 1) {
self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"];
} else {
self.firstLoveImageView.hidden = YES;
}
CGFloat firstLoveWidth = 32;
......
......@@ -16,9 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) void(^clickSendGiftHandler)(NSString *gid, NSInteger num);
+ (FUSAudiencePopView *)fus_showAudiencePopViewWithUserList:(NSArray<FUSOnlineUserModel *> *)userList startWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView;
- (void)fus_showWithUserList:(NSArray<FUSOnlineUserModel *> *)userList;
+ (FUSAudiencePopView *)fus_showAudiencePopViewStartWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView;
- (void)fus_dismissView;
......
......@@ -36,11 +36,11 @@
@implementation FUSAudiencePopView
+ (FUSAudiencePopView *)fus_showAudiencePopViewWithUserList:(NSArray<FUSOnlineUserModel *> *)userList startWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView {
+ (FUSAudiencePopView *)fus_showAudiencePopViewStartWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView {
FUSAudiencePopView *popView = [[FUSAudiencePopView alloc] initWithFrame:UIView.fus_screenFrame];
[rootView addSubview:popView];
[popView.segmentView fus_setSelectedItem:(startWithContribute ? 2 : 0) autoCallBack:YES];
[popView fus_showWithUserList:userList];
[popView fus_showUserList];
return popView;
}
......@@ -91,6 +91,7 @@
if (weakSelf.clickUserHandler) {
weakSelf.clickUserHandler(user);
}
[weakSelf fus_dismissView];
};
[self.scrollView addSubview:self.onlineUserView];
......@@ -100,6 +101,7 @@
if (weakSelf.clickUserHandler) {
weakSelf.clickUserHandler(user);
}
[weakSelf fus_dismissView];
};
[self.scrollView addSubview:self.vipUserView];
......@@ -110,6 +112,7 @@
if (weakSelf.clickUserHandler) {
weakSelf.clickUserHandler(userModel);
}
[weakSelf fus_dismissView];
};
self.contributeView.clickSendGiftHandler = ^(NSString * _Nonnull gid, NSInteger num) {
[weakSelf fus_dismissView];
......@@ -123,10 +126,13 @@
return self;
}
- (void)fus_showWithUserList:(NSArray<FUSOnlineUserModel *> *)userList {
[self.onlineUserView setUserList:userList isVipOnly:NO];
[self.vipUserView setUserList:userList isVipOnly:YES];
- (void)fus_showUserList {
[self.onlineUserView showUserListWithIsVipOnly:NO];
__weak typeof(self) weakSelf = self;
self.onlineUserView.totalUserChangedHandler = ^(NSInteger total) {
[weakSelf.segmentView fus_setImageForIndex:0 title:[NSString stringWithFormat:@"%@ %zd",FUSLocalizationHelper.versionLocalString(@"观看人数"),total]];
};
[self.vipUserView showUserListWithIsVipOnly:YES];
[UIView animateWithDuration:0.3 animations:^{
self.contentView.bottom = UIView.fus_screenH;
}];
......
......@@ -16,11 +16,14 @@ NS_ASSUME_NONNULL_BEGIN
/// 点击用户回调
@property (nonatomic, copy) void(^clickUserHandler)(FUSOnlineUserModel *user);
@property (nonatomic, copy) void(^totalUserChangedHandler)(NSInteger total);
/// 传入用户列表
/// - Parameters:
/// - userList: 用户列表
/// - isVipOnly: 是否只显示VIP
- (void)setUserList:(NSArray<FUSOnlineUserModel *> * _Nonnull)userList isVipOnly:(BOOL)isVipOnly;
- (void)showUserListWithIsVipOnly:(BOOL)isVipOnly;
@end
......
......@@ -9,11 +9,16 @@
#import "FUSAudienceTableViewCell.h"
#import <Masonry/Masonry.h>
#import "FUSLiveHelper.h"
@interface FUSAudienceListView () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, copy) NSArray<FUSOnlineUserModel *> *userList;
@property (nonatomic, strong) NSMutableArray<FUSOnlineUserModel *> *userList;
/// 用户uid列表
@property (nonatomic, strong) NSMutableSet *userIdSet;
/// vip的View
@property (nonatomic, strong) UIView *openVIPView;
......@@ -24,6 +29,12 @@
/// 开通VIP btn
@property (nonatomic, strong) FUSStyleButton *openVIPBtn;
/// 页码
@property (nonatomic, assign) NSInteger page;
/// 是否vip列表
@property (nonatomic, assign) BOOL isVipOnly;
@end
@implementation FUSAudienceListView
......@@ -39,51 +50,31 @@
self.tableView.rowHeight = 60;
self.tableView.tableFooterView = [[UIView alloc] init];
[self addSubview:self.tableView];
__weak typeof(self) weakSelf = self;
self.tableView.mj_header = [FUSRefreshHeader headerWithRefreshingBlock:^{
[weakSelf fus_reloadData];
}];
self.tableView.mj_footer = [FUSRefreshAutoFooter footerWithRefreshingBlock:^{
[weakSelf fus_loadMoreData];
}];
}
return self;
}
- (void)setUserList:(NSArray<FUSOnlineUserModel *> *)userList isVipOnly:(BOOL)isVipOnly {
NSMutableArray *dataSource = [NSMutableArray arrayWithArray:userList];
if (isVipOnly) {
/// 传入用户列表
/// - Parameters:
/// - userList: 用户列表
/// - isVipOnly: 是否只显示VIP
- (void)showUserListWithIsVipOnly:(BOOL)isVipOnly {
_isVipOnly = isVipOnly;
if (isVipOnly) {
[self fus_setupVIPViews];
for (FUSOnlineUserModel *user in userList) {
if ([user.privilege[@"richPower"] integerValue] != 1) {
[dataSource removeObject:user];
}
}
self.userList = [dataSource sortedArrayUsingComparator:^NSComparisonResult(FUSOnlineUserModel * _Nonnull obj1, FUSOnlineUserModel * _Nonnull obj2) {
if (obj1.realLevel.integerValue > obj2.realLevel.integerValue) {
return NSOrderedAscending;
} else if (obj1.realLevel.integerValue < obj2.realLevel.integerValue) {
return NSOrderedDescending;
} else if (obj1.lev.integerValue > obj2.lev.integerValue) {
return NSOrderedAscending;
} else if (obj1.lev.integerValue < obj2.lev.integerValue) {
return NSOrderedDescending;
} else {
return NSOrderedSame;
}
}];
} else {
self.userList = [dataSource sortedArrayUsingComparator:^NSComparisonResult(FUSOnlineUserModel * _Nonnull obj1, FUSOnlineUserModel * _Nonnull obj2) {
if (obj1.addedTime > obj2.addedTime) {
return NSOrderedAscending;
} else if (obj1.addedTime < obj2.addedTime) {
return NSOrderedDescending;
} else {
return NSOrderedSame;
}
}];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
}
[self.tableView reloadData];
[self fus_reloadData];
}
- (void)fus_setupVIPViews {
......@@ -164,4 +155,56 @@
}
}
#pragma mark - Datas
- (void)fus_reloadData {
self.page = 1;
[self fus_loadData];
}
- (void)fus_loadMoreData {
self.page++;
[self fus_loadData];
}
- (void)fus_loadData {
NSDictionary *params = @{
@"roomId":FUSLiveHelper.shareInstance.roomInfoModel.roomId,
@"type":@(self.isVipOnly ? 1 : 0),
@"page":@(self.page)
};
[FUSHttpHelper postRequestBinaryWithUrl:URL_Live_Real_Users_GetList params:params success:^(NSDictionary * _Nullable dataDict, int code) {
self.page = [dataDict[@"page"] integerValue];
if (self.page == 1) {
[self.userList removeAllObjects];
self.userList = [NSMutableArray array];
[self.userIdSet removeAllObjects];
self.userIdSet = [NSMutableSet set];
}
NSMutableArray *users = [NSMutableArray array];
for (NSDictionary *user in dataDict[@"users"]) {
FUSOnlineUserModel *model = [FUSOnlineUserModel fus_modelWithDict:user];
/// 去重
if (![self.userIdSet containsObject:model.uid]) {
[self.userIdSet addObject:model.uid];
[users addObject:model];
}
}
[self.userList addObjectsFromArray:users];
[self.tableView reloadData];
if (self.totalUserChangedHandler && dataDict[@"total"]) {
NSInteger total = [dataDict[@"total"] integerValue];
self.totalUserChangedHandler(total);
}
} failure:^(NSDictionary * _Nullable dataDict, int code) {
[FUSDialogView fus_showDialog:dataDict[@"msg"]];
}];
}
@end
......@@ -141,8 +141,9 @@
[self.faceImageView setWebImageWithSubURLString:userModel.face];
self.nicknameLabel.text = userModel.nickname;
self.firstLoveImageView.hidden = YES;
BOOL ishide = userModel.isHide.boolValue;
if (ishide) {
self.firstLoveImageView.hidden = YES;
self.onlineLabel.hidden = YES;
......@@ -176,8 +177,6 @@
if ([userModel.privilege[@"firstChargePower"] integerValue] == 1) {
self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"];
} else {
self.firstLoveImageView.hidden = YES;
}
CGFloat firstLoveWidth = 32;
......
......@@ -5766,7 +5766,7 @@ FUSLinkMicUserListDelegate
{
// 审核状态下不显示守护榜
// if (FUSConfig.sharedInstanced.devConfigs.appStatus) return;
[self fus_showAudiencePopView:self.userListViewModel startWithContribute:YES];
[self fus_showAudiencePopViewStartWithContribute:YES];
// __weak typeof(self) weakSelf = self;
// // 正在显示,不重复显示
// if (_liveFireCountView.isOnShow == YES) return;
......@@ -5801,16 +5801,12 @@ FUSLinkMicUserListDelegate
}
- (void)fus_headViewClickUserCountBtnAction:(FUSLiveHeaderUserListViewModel *)userListModel {
[self fus_showAudiencePopView:userListModel startWithContribute:NO];
[self fus_showAudiencePopViewStartWithContribute:NO];
}
- (void)fus_showAudiencePopView:(FUSLiveHeaderUserListViewModel *)userListModel startWithContribute:(BOOL)startWithContribute {
NSMutableArray *userList = [NSMutableArray array];
for (NSArray *list in userListModel.realUserList) {
[userList appendObjects:list];
}
- (void)fus_showAudiencePopViewStartWithContribute:(BOOL)startWithContribute {
FUSAudiencePopView *popView = [FUSAudiencePopView fus_showAudiencePopViewWithUserList:userList startWithContribute:startWithContribute rootView:[self fus_viewWithLayer:FUSLiveFunctionLayerManualPopView]];
FUSAudiencePopView *popView = [FUSAudiencePopView fus_showAudiencePopViewStartWithContribute:startWithContribute rootView:[self fus_viewWithLayer:FUSLiveFunctionLayerManualPopView]];
__weak typeof(self) weakSelf = self;
popView.clickUserHandler = ^(FUSOnlineUserModel * _Nonnull user) {
FUSRoomUserInfoModel *roomUserInfo = [FUSRoomUserInfoModel fus_modelWithDict:user.fus_getDictionary];
......
......@@ -1115,7 +1115,7 @@
} else if (model.realLevel.integerValue < user.realLevel.integerValue) {
break;
} else {
if (model.addedTime < user.addedTime) {
if (model.addTimestamp < user.addTimestamp) {
continue;
} else {
break;
......@@ -1191,7 +1191,7 @@
midIndex = endIndex;
while ([self fus_isNormalUser1:user
biggerThanNormalUser2:midModel] == NSOrderedSame
&& user.addedTime < midModel.addedTime
&& user.addTimestamp < midModel.addTimestamp
&& midIndex > 0) {
midIndex--;
if (midIndex > 0) {
......
......@@ -228,7 +228,7 @@
self.faceAnimationImageView.animationImages = animImages;
self.faceAnimationImageView.animationDuration = 2.03;
self.topUpBtn.style = FUSButtonStyleBlueBorder;
self.topUpBtn.style = FUSButtonStyleBlue;
self.topUpBtn.layer.cornerRadius = self.topUpBtn.height / 2.0f;
self.topUpBtn.layer.masksToBounds = YES;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -28,22 +28,19 @@
<action selector="clickCloseBtnAction:" destination="-1" eventType="touchUpInside" id="bFh-Kr-tly"/>
</connections>
</button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg_img" translatesAutoresizingMaskIntoConstraints="NO" id="dQV-DW-kxC">
<rect key="frame" x="62" y="251" width="290" height="394"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x8N-H9-KWj">
<rect key="frame" x="72" y="261" width="270" height="374"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现在就撩" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hVf-9l-wto">
<rect key="frame" x="20" y="25" width="230" height="24"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="儲值1寶石即可於主播互動,儲值成功後,“撩一下”禮物會自動發送至您的背包,獲得主播青睞成功率100%" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KXg-lT-Yyw">
<rect key="frame" x="20" y="61" width="230" height="50.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.90196078431372551" green="0.90196078431372551" blue="0.90196078431372551" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="live_first_charge_alert_face_bg" translatesAutoresizingMaskIntoConstraints="NO" id="5vj-wa-4PE">
......@@ -76,7 +73,7 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Ddw-Q2-Om6" firstAttribute="centerX" secondItem="5vj-wa-4PE" secondAttribute="centerX" id="0AV-28-Acd"/>
<constraint firstItem="hVf-9l-wto" firstAttribute="top" secondItem="x8N-H9-KWj" secondAttribute="top" constant="25" id="1ai-mn-ZvX"/>
......@@ -95,19 +92,21 @@
<constraint firstItem="KXg-lT-Yyw" firstAttribute="leading" secondItem="hVf-9l-wto" secondAttribute="leading" id="moo-PD-OO0"/>
<constraint firstAttribute="width" constant="270" id="z4F-FUS-jEE"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="16"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="x8N-H9-KWj" firstAttribute="top" secondItem="dQV-DW-kxC" secondAttribute="top" constant="10" id="1Sl-gM-Z7H"/>
<constraint firstItem="x8N-H9-KWj" firstAttribute="leading" secondItem="dQV-DW-kxC" secondAttribute="leading" constant="10" id="3AN-WW-Wp5"/>
<constraint firstItem="tdB-gh-oJK" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="5s5-zk-pYQ"/>
<constraint firstItem="tdB-gh-oJK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="8wp-4r-NCk"/>
<constraint firstItem="x8N-H9-KWj" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="B4d-lq-dMX"/>
<constraint firstItem="dQV-DW-kxC" firstAttribute="bottom" secondItem="x8N-H9-KWj" secondAttribute="bottom" constant="10" id="VO4-6F-RZ1"/>
<constraint firstAttribute="trailing" secondItem="tdB-gh-oJK" secondAttribute="trailing" id="VxO-CX-VDj"/>
<constraint firstItem="dQV-DW-kxC" firstAttribute="trailing" secondItem="x8N-H9-KWj" secondAttribute="trailing" constant="10" id="chW-q6-ZZz"/>
<constraint firstItem="x8N-H9-KWj" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="mVN-UV-2vo"/>
<constraint firstAttribute="bottom" secondItem="tdB-gh-oJK" secondAttribute="bottom" id="piM-FB-4bK"/>
</constraints>
......@@ -115,7 +114,6 @@
</view>
</objects>
<resources>
<image name="common_alert_bg_img" width="120.5" height="118.5"/>
<image name="live_first_charge_alert_face_bg" width="162.5" height="162.5"/>
</resources>
</document>
......@@ -775,7 +775,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
//1图片 2文本。
NSInteger type = [dataDict[@"type"] integerValue];
NSDictionary *style = dataDict[@"style"];
if (type == 1) {
if (type == 1 && dataDict[@"imgUrl"]) {
NSString *imgUrl = [dataDict[@"imgUrl"] description];
CGFloat width = [style[@"width"] doubleValue];
......@@ -791,7 +791,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
// 这里不用一个customView包住imageView的话,image的图片宽度会被titleView根据图片真实宽度改变
self.wkVC.navigationItem.titleView = customView;
} else if (type == 2) {
} else if (type == 2 || dataDict[@"imgTxt"]) {
NSString *imgTxt = [dataDict[@"imgTxt"] description];
NSString *color = [dataDict[@"color"] description];
CGFloat fontSize = [dataDict[@"font-size"] doubleValue];
......
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