Commit 72641ad8 by pierce

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

parents 68731134 7e39daa3
Showing with 190 additions and 57 deletions
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZKw-mW-Goa"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZKw-mW-Goa">
<rect key="frame" x="187" y="653.5" width="40" height="40"/> <rect key="frame" x="187" y="635.5" width="40" height="40"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="40" id="DZa-tC-N2x"/> <constraint firstAttribute="width" constant="40" id="DZa-tC-N2x"/>
<constraint firstAttribute="height" constant="40" id="ZMe-1G-Vjl"/> <constraint firstAttribute="height" constant="40" id="ZMe-1G-Vjl"/>
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<constraint firstItem="SQ8-aL-IkM" firstAttribute="centerY" secondItem="6ga-LE-F7L" secondAttribute="centerY" id="8sN-wd-hOD"/> <constraint firstItem="SQ8-aL-IkM" firstAttribute="centerY" secondItem="6ga-LE-F7L" secondAttribute="centerY" id="8sN-wd-hOD"/>
<constraint firstItem="B2Q-Kv-Z7j" firstAttribute="centerY" secondItem="6ga-LE-F7L" secondAttribute="centerY" id="FOk-Ts-UgB"/> <constraint firstItem="B2Q-Kv-Z7j" firstAttribute="centerY" secondItem="6ga-LE-F7L" secondAttribute="centerY" id="FOk-Ts-UgB"/>
<constraint firstItem="SQ8-aL-IkM" firstAttribute="height" secondItem="B2Q-Kv-Z7j" secondAttribute="height" multiplier="1.06769" id="Rpw-PV-PUM"/> <constraint firstItem="SQ8-aL-IkM" firstAttribute="height" secondItem="B2Q-Kv-Z7j" secondAttribute="height" multiplier="1.06769" id="Rpw-PV-PUM"/>
<constraint firstItem="ZKw-mW-Goa" firstAttribute="top" secondItem="SQ8-aL-IkM" secondAttribute="bottom" constant="32" id="bGo-eB-8nm"/> <constraint firstItem="ZKw-mW-Goa" firstAttribute="top" secondItem="SQ8-aL-IkM" secondAttribute="bottom" constant="14" id="bGo-eB-8nm"/>
<constraint firstItem="ZKw-mW-Goa" firstAttribute="centerX" secondItem="6ga-LE-F7L" secondAttribute="centerX" id="kxb-c9-Ddj"/> <constraint firstItem="ZKw-mW-Goa" firstAttribute="centerX" secondItem="6ga-LE-F7L" secondAttribute="centerX" id="kxb-c9-Ddj"/>
<constraint firstItem="SQ8-aL-IkM" firstAttribute="centerX" secondItem="6ga-LE-F7L" secondAttribute="centerX" id="op1-k5-uAU"/> <constraint firstItem="SQ8-aL-IkM" firstAttribute="centerX" secondItem="6ga-LE-F7L" secondAttribute="centerX" id="op1-k5-uAU"/>
<constraint firstItem="SQ8-aL-IkM" firstAttribute="width" secondItem="B2Q-Kv-Z7j" secondAttribute="width" multiplier="1.08148" id="t5Q-2E-hvt"/> <constraint firstItem="SQ8-aL-IkM" firstAttribute="width" secondItem="B2Q-Kv-Z7j" secondAttribute="width" multiplier="1.08148" id="t5Q-2E-hvt"/>
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
</objects> </objects>
<resources> <resources>
<image name="OBS_close" width="26" height="26"/> <image name="OBS_close" width="26" height="26"/>
<image name="checkIn_placeholder" width="27" height="27"/> <image name="checkIn_placeholder" width="150" height="150"/>
<image name="daily_check_inrotation_lightimg" width="186.66667175292969" height="186.66667175292969"/> <image name="daily_check_inrotation_lightimg" width="103.66666412353516" height="103.66666412353516"/>
</resources> </resources>
</document> </document>
...@@ -90,6 +90,12 @@ ...@@ -90,6 +90,12 @@
self.textLabel.x = 16; self.textLabel.x = 16;
} }
self.detailTextLabel.centerY = self.textLabel.centerY; self.detailTextLabel.centerY = self.textLabel.centerY;
if (_item.type == CustomSettingItemTypeArrow ||
_item.type == CustomSettingItemTypeShowTextAndArrow ||
_item.type == CustomSettingItemTypeShowImageAndArrow ||
_item.type == CustomSettingItemTypeShowLabelAndArrow) {
self.detailTextLabel.right = self.detailTextLabel.right + 10;
}
} }
[self fus_fitRTLViews]; [self fus_fitRTLViews];
[self fus_updateMask]; [self fus_updateMask];
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
collectionViewLayout:[[UICollectionViewFlowLayout alloc]init]]; collectionViewLayout:[[UICollectionViewFlowLayout alloc]init]];
self.collectionView.scrollsToTop = YES; self.collectionView.scrollsToTop = YES;
// self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 0, 0, UIView.fus_tabbarHeight, 0); // self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 0, 0, UIView.fus_tabbarHeight, 0);
self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 4, 0, UIView.fus_tabbarHeight, 0); self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 4, 0, 0, 0);
self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
self.collectionView.backgroundColor = [UIColor clearColor]; self.collectionView.backgroundColor = [UIColor clearColor];
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
[self addSubview:self.homeBtn]; [self addSubview:self.homeBtn];
[self.homeBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.homeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.mas_centerX); make.centerX.equalTo(self.mas_centerX);
make.centerY.equalTo(self.mas_centerY).offset(10); make.centerY.equalTo(self.mas_centerY).offset(2);
make.size.mas_equalTo(CGSizeMake(80, 44)); make.size.mas_equalTo(CGSizeMake(80, 44));
}]; }];
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
[leftTempView addSubview:self.myBtn]; [leftTempView addSubview:self.myBtn];
[self.myBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.myBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(leftTempView.mas_centerX); make.centerX.equalTo(leftTempView.mas_centerX);
make.centerY.equalTo(leftTempView.mas_centerY).offset(10); make.centerY.equalTo(leftTempView.mas_centerY).offset(2);
make.size.mas_equalTo(CGSizeMake(80, 44)); make.size.mas_equalTo(CGSizeMake(80, 44));
}]; }];
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
[rightTempView addSubview:self.messageBtn]; [rightTempView addSubview:self.messageBtn];
[self.messageBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.messageBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(rightTempView.mas_centerX); make.centerX.equalTo(rightTempView.mas_centerX);
make.centerY.equalTo(rightTempView.mas_centerY).offset(10); make.centerY.equalTo(rightTempView.mas_centerY).offset(2);
make.size.mas_equalTo(CGSizeMake(80, 44)); make.size.mas_equalTo(CGSizeMake(80, 44));
}]; }];
...@@ -133,10 +133,14 @@ ...@@ -133,10 +133,14 @@
if (self.shouldBarCenterTransparency && _currentIndex == 1) { if (self.shouldBarCenterTransparency && _currentIndex == 1) {
normalBtnImgNamesList = self.barItemImageNameWhiteList; normalBtnImgNamesList = self.barItemImageNameWhiteList;
self.bgImageView.alpha = 0; // self.bgImageView.alpha = 0;
}else {
self.bgImageView.alpha = 1;
} }
// else {
// self.bgImageView.alpha = 1;
// }
// 暂时不需要外部item填满没填满来判定在中间时候背景消失不消失了
self.bgImageView.alpha = (_currentIndex == 1) ? 0 : 1;
for (int i = 0; i < self.btnList.count; i++) { for (int i = 0; i < self.btnList.count; i++) {
UIButton *tempBtn = self.btnList[i]; UIButton *tempBtn = self.btnList[i];
......
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
self.emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 400)]; self.emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 400)];
self.emptyView.contentAligment = FUSEmptyViewAligmentCenter; self.emptyView.contentAligment = FUSEmptyViewAligmentCenter;
[self.emptyView fus_setEmptyViewIcon:[UIImage imageNamed:@"fireFly_zone_empty_fireCount"] title:[NSString fus_localString:@"当前还没用户上榜"] buttonTittle:nil]; [self.emptyView fus_setEmptyViewIcon:[UIImage imageNamed:@"fireFly_zone_empty_fireCount"] title:[NSString fus_localString:@"当前还没用户上榜"] buttonTittle:nil];
self.emptyView.imageScale = 0.5; self.emptyView.imageScale = 0.3;
self.emptyView.contentVerticalOffset = -40; self.emptyView.contentVerticalOffset = -30;
self.emptyView.backgroundColor = [UIColor clearColor]; self.emptyView.backgroundColor = [UIColor clearColor];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
......
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
make.left.right.inset(18); make.left.right.inset(18);
make.top.bottom.inset(10); make.top.bottom.inset(10);
}]; }];
self.diamondLabel.textColor = [UIColor fus_fireGreen];
} }
- (void)viewWillAppear:(BOOL)animated - (void)viewWillAppear:(BOOL)animated
......
...@@ -86,10 +86,10 @@ ...@@ -86,10 +86,10 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="140"/> <rect key="frame" x="0.0" y="0.0" width="375" height="140"/>
</imageView> </imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zone_account_large_diamond" translatesAutoresizingMaskIntoConstraints="NO" id="aaY-22-EGN"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zone_account_large_diamond" translatesAutoresizingMaskIntoConstraints="NO" id="aaY-22-EGN">
<rect key="frame" x="167.66666666666666" y="47" width="40" height="40"/> <rect key="frame" x="167.66666666666666" y="34" width="40" height="40"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n8P-Xq-PGq"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n8P-Xq-PGq">
<rect key="frame" x="180" y="87" width="15" height="27.666666666666671"/> <rect key="frame" x="180" y="74" width="15" height="27.666666666666671"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="23"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="23"/>
<color key="textColor" red="0.0" green="0.95294117647058818" blue="0.84313725490196079" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.95294117647058818" blue="0.84313725490196079" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<constraint firstItem="aaY-22-EGN" firstAttribute="centerX" secondItem="Tax-eY-knd" secondAttribute="centerX" id="JZ3-ed-zn6"/> <constraint firstItem="aaY-22-EGN" firstAttribute="centerX" secondItem="Tax-eY-knd" secondAttribute="centerX" id="JZ3-ed-zn6"/>
<constraint firstAttribute="height" constant="140" id="W8k-nh-YN8"/> <constraint firstAttribute="height" constant="140" id="W8k-nh-YN8"/>
<constraint firstItem="n8P-Xq-PGq" firstAttribute="centerX" secondItem="aaY-22-EGN" secondAttribute="centerX" id="a1d-ch-S3q"/> <constraint firstItem="n8P-Xq-PGq" firstAttribute="centerX" secondItem="aaY-22-EGN" secondAttribute="centerX" id="a1d-ch-S3q"/>
<constraint firstItem="aaY-22-EGN" firstAttribute="top" secondItem="Tax-eY-knd" secondAttribute="top" constant="47" id="bUt-Xp-tEe"/> <constraint firstItem="aaY-22-EGN" firstAttribute="top" secondItem="Tax-eY-knd" secondAttribute="top" constant="34" id="bUt-Xp-tEe"/>
<constraint firstAttribute="trailing" secondItem="Bgu-xc-yko" secondAttribute="trailing" id="btG-Mw-XU4"/> <constraint firstAttribute="trailing" secondItem="Bgu-xc-yko" secondAttribute="trailing" id="btG-Mw-XU4"/>
<constraint firstItem="Bgu-xc-yko" firstAttribute="top" secondItem="Tax-eY-knd" secondAttribute="top" id="nys-np-U6Y"/> <constraint firstItem="Bgu-xc-yko" firstAttribute="top" secondItem="Tax-eY-knd" secondAttribute="top" id="nys-np-U6Y"/>
<constraint firstAttribute="bottom" secondItem="Bgu-xc-yko" secondAttribute="bottom" id="se2-c9-g16"/> <constraint firstAttribute="bottom" secondItem="Bgu-xc-yko" secondAttribute="bottom" id="se2-c9-g16"/>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
self.contentView.backgroundColor = UIColor.fus_appBGColor; self.contentView.backgroundColor = UIColor.fus_appBGColor;
self.selectedBackgroundView = [[UIView alloc] init]; self.selectedBackgroundView = [[UIView alloc] init];
self.selectedBackgroundView.backgroundColor = UIColor.fus_appBGPressColor; self.selectedBackgroundView.backgroundColor = UIColor.fus_appBGPressColor;
[self.diamondButton setTitleColor:[UIColor fus_diamondBlue] forState:UIControlStateNormal];
} }
- (void)setExchangeDiamondModel:(FUSExchangeDiamondModel *)exchangeDiamondModel - (void)setExchangeDiamondModel:(FUSExchangeDiamondModel *)exchangeDiamondModel
......
...@@ -254,8 +254,8 @@ ...@@ -254,8 +254,8 @@
if (_dataArray.count == 0) { if (_dataArray.count == 0) {
// FUSEmptyView *emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH - UIView.fus_StatusBarAndNavgationBarHeight - UIView.fus_tabbarHeight)]; // FUSEmptyView *emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH - UIView.fus_StatusBarAndNavgationBarHeight - UIView.fus_tabbarHeight)];
FUSEmptyView *emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, self.height - self.headerView.height)]; FUSEmptyView *emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, self.height - self.headerView.height)];
emptyView.imageScale = 0.5; emptyView.imageScale = 0.3;
emptyView.contentVerticalOffset = -40; emptyView.contentVerticalOffset = -30;
[emptyView fus_setEmptyViewIcon:[UIImage imageNamed:@"com_icon_hot_no_data_empty"] title:[NSString fus_localString:@"您还没有收到私信"] buttonTittle:nil]; [emptyView fus_setEmptyViewIcon:[UIImage imageNamed:@"com_icon_hot_no_data_empty"] title:[NSString fus_localString:@"您还没有收到私信"] buttonTittle:nil];
self.tableFooterView = emptyView; self.tableFooterView = emptyView;
} else { } else {
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
layout:(UICollectionViewLayout *)collectionViewLayout layout:(UICollectionViewLayout *)collectionViewLayout
referenceSizeForHeaderInSection:(NSInteger)section { referenceSizeForHeaderInSection:(NSInteger)section {
return CGSizeMake(collectionView.width, 53); return CGSizeMake(collectionView.width, 32);
} }
......
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
if (motoringArr.count==0) { if (motoringArr.count==0) {
FUSEmptyView *emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH-UIView.fus_StatusBarAndNavgationBarHeight)]; FUSEmptyView *emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH-UIView.fus_StatusBarAndNavgationBarHeight)];
[emptyView fus_setEmptyViewIcon:[UIImage fus_emptyImg] title:[NSString fus_localString:@"暂无座驾以供选择"] buttonTittle:nil]; [emptyView fus_setEmptyViewIcon:[UIImage fus_emptyImg] title:[NSString fus_localString:@"暂无座驾以供选择"] buttonTittle:nil];
emptyView.imageScale = 0.5; emptyView.imageScale = 0.3;
emptyView.contentVerticalOffset = -40; emptyView.contentVerticalOffset = -30;
[self.view addSubview:emptyView]; [self.view addSubview:emptyView];
} }
[self.tableView.mj_header endRefreshing]; [self.tableView.mj_header endRefreshing];
......
...@@ -843,6 +843,7 @@ class FUSZoneUserInfoEditViewController: FUSBaseViewController, UITextViewDelega ...@@ -843,6 +843,7 @@ class FUSZoneUserInfoEditViewController: FUSBaseViewController, UITextViewDelega
} else { } else {
self.signTextView.text = NSString.fus_localString("嗨,我刚加入FuSi Live,希望和你成为朋友。") self.signTextView.text = NSString.fus_localString("嗨,我刚加入FuSi Live,希望和你成为朋友。")
} }
signTextView.contentInset = UIEdgeInsets(top: (signTextView.bounds.size.height - signTextView.contentSize.height) / 2, left: 0, bottom: 0, right: 0)
if !NSString.isNull(self.userInfoModel?.height) { if !NSString.isNull(self.userInfoModel?.height) {
self.heightLabel.text = (self.userInfoModel?.height ?? "") + " cm" self.heightLabel.text = (self.userInfoModel?.height ?? "") + " cm"
...@@ -976,6 +977,8 @@ class FUSZoneUserInfoEditViewController: FUSBaseViewController, UITextViewDelega ...@@ -976,6 +977,8 @@ class FUSZoneUserInfoEditViewController: FUSBaseViewController, UITextViewDelega
self.infoDict.removeObject(forKey: "sign") self.infoDict.removeObject(forKey: "sign")
} }
textView.contentInset = UIEdgeInsets(top: (textView.bounds.size.height - textView.contentSize.height) / 2, left: 0, bottom: 0, right: 0)
self.fus_setRightBtnEnable() self.fus_setRightBtnEnable()
} }
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
#import "FUSMyZoneInfoCell.h" #import "FUSMyZoneInfoCell.h"
#import "FUSCacheDataShare.h" #import "FUSCacheDataShare.h"
@interface FUSMyZoneInfoCell () #import "FUSVideoPlayer.h"
#import "FUSVoiceSignRecordViewController.h"
@interface FUSMyZoneInfoCell ()<FUSVideoPlayerDelegate>
@property (strong, nonatomic) IBOutlet UILabel *nickNameLabel; @property (strong, nonatomic) IBOutlet UILabel *nickNameLabel;
...@@ -23,6 +25,12 @@ ...@@ -23,6 +25,12 @@
@property (weak, nonatomic) IBOutlet UIImageView *richImageView; @property (weak, nonatomic) IBOutlet UIImageView *richImageView;
@property (strong, nonatomic) IBOutlet UIButton *richBtn; @property (strong, nonatomic) IBOutlet UIButton *richBtn;
@property (weak, nonatomic) IBOutlet UIButton *recordOrPlayBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *recordOrPlayBtnWidthConstraint;
// 播放器
@property (nonatomic, strong) FUSVideoPlayer *audioPlayer;
// 粉丝数量 // 粉丝数量
@property (weak, nonatomic) IBOutlet UILabel *fansNumLabel; @property (weak, nonatomic) IBOutlet UILabel *fansNumLabel;
// 追踪数量 // 追踪数量
...@@ -38,9 +46,20 @@ ...@@ -38,9 +46,20 @@
@end @end
@implementation FUSMyZoneInfoCell @implementation FUSMyZoneInfoCell
- (void)dealloc {
[_audioPlayer fus_stopPlayer];
_audioPlayer = nil;
}
- (void)awakeFromNib { - (void)awakeFromNib {
[super awakeFromNib]; [super awakeFromNib];
self.recordOrPlayBtn.layer.cornerRadius = self.recordOrPlayBtn.height / 2.0f;
self.recordOrPlayBtn.layer.masksToBounds = YES;
[self.recordOrPlayBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal];
self.selectionStyle = UITableViewCellSelectionStyleNone; self.selectionStyle = UITableViewCellSelectionStyleNone;
_levelLabel.layer.cornerRadius = _levelLabel.height / 2; _levelLabel.layer.cornerRadius = _levelLabel.height / 2;
_levelLabel.layer.masksToBounds = YES; _levelLabel.layer.masksToBounds = YES;
...@@ -64,7 +83,7 @@ ...@@ -64,7 +83,7 @@
_focusNumLabel.text = [NSString isNull:zoneModel.myfollow] ? @"0" : zoneModel.myfollow; _focusNumLabel.text = [NSString isNull:zoneModel.myfollow] ? @"0" : zoneModel.myfollow;
self.nickNameLabel.text = zoneModel.nickname.length > 0 ? zoneModel.nickname : @"-"; self.nickNameLabel.text = zoneModel.nickname.length > 0 ? zoneModel.nickname : @"-";
self.idLabel.text = [NSString stringWithFormat:@"ID:%@",zoneModel.uid]; self.idLabel.text = [NSString stringWithFormat:@"Fusi ID:%@",zoneModel.uid];
[super fus_setupCellWithModel:zoneModel isMyZone:isMyZone]; [super fus_setupCellWithModel:zoneModel isMyZone:isMyZone];
[self cleanCell]; [self cleanCell];
...@@ -135,6 +154,30 @@ ...@@ -135,6 +154,30 @@
// } else { // } else {
// self.verifiedImageView.hidden = YES; // self.verifiedImageView.hidden = YES;
// } // }
if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
self.recordOrPlayBtn.hidden = YES;
} else {
if ([NSDictionary isNull:zoneModel.voiceChat] || [zoneModel.voiceChat[@"status"] integerValue] == -1) {
if (!isMyZone) {
self.recordOrPlayBtn.hidden = YES;
} else {
self.recordOrPlayBtn.hidden = NO;
[self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_record_btn_img"] forState:UIControlStateNormal];
[self.recordOrPlayBtn setTitle:[NSString fus_localString:@"录制语音"] forState:UIControlStateNormal];
[self.recordOrPlayBtn sizeToFit];
self.recordOrPlayBtnWidthConstraint.constant = self.recordOrPlayBtn.width + 20;
}
} else {
self.recordOrPlayBtn.hidden = NO;
self.recordOrPlayBtnWidthConstraint.constant = 78;
NSString *timeStr = [NSString stringWithFormat:@"%@s",zoneModel.voiceChat[@"duration"]];
[self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_voice_sign_play_btn_icon_anim_11"] forState:UIControlStateNormal];
[self.recordOrPlayBtn setTitle:timeStr forState:UIControlStateNormal];
}
}
self.verifiedImageView.hidden = YES; self.verifiedImageView.hidden = YES;
} }
...@@ -160,5 +203,61 @@ ...@@ -160,5 +203,61 @@
[pasteboard setString:self.zoneModel.uid]; [pasteboard setString:self.zoneModel.uid];
[FUSDialogView fus_showDialog:[NSString fus_localString:@"复制ID成功"]]; [FUSDialogView fus_showDialog:[NSString fus_localString:@"复制ID成功"]];
} }
- (IBAction)clickRecordOrPlayBtnAction:(UIButton *)sender {
if ([NSDictionary isNull:self.zoneModel.voiceChat]
// -1:为没有上传签名或者审核未通过
|| [self.zoneModel.voiceChat[@"status"] integerValue] == -1) {
[[UIViewController fus_topViewController].navigationController pushViewController:[[FUSVoiceSignRecordViewController alloc] init] animated:YES];
} else if ([self.zoneModel.voiceChat[@"status"] integerValue] == 0) {
// 0:正在审核中
[FUSDialogView fus_showDialog:[NSString fus_localString:@"语音审核中,请耐心等待"]];
} else {
// 审核通过。可以播放
if (!_audioPlayer) {
_audioPlayer = [[FUSVideoPlayer alloc] initWithPlayView:nil];
_audioPlayer.delegate = self;
}
// [self fus_setPlayProgress:0];
if (_audioPlayer.fus_isPlaying) {
[_audioPlayer fus_seekToTime:kCMTimeZero];
} else {
NSString *playUrl = [FUSConfig.sharedInstanced.pathConfigs downloadPath:self.zoneModel.voiceChat[@"url"]];
AVPlayerItem *playItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:playUrl]];
[_audioPlayer fus_playVideoWithPlayItem:playItem];
}
}
}
#pragma mark other method
- (void)fus_stopAudioPlayer {
[_audioPlayer fus_stopPlayer];
_audioPlayer = nil;
// [self fus_setPlayProgress:0];
}
#pragma mark - FUSVideoPlayerDelegate
/**
进度改变的接口
@param videoPlayer 当前视频播放器
@param currentTime 当前视频进度
@param duration 当前视频的总时长
*/
- (void)fus_videoPlayer:(FUSVideoPlayer *)videoPlayer
progressDidChanged:(CGFloat)currentTime
duration:(CGFloat)duration {
// [self fus_setPlayProgress:currentTime / duration];
}
- (void)fus_videoPlayer:(FUSVideoPlayer *)videoPlayer playStateDidChanged:(FUSPlayState)playState {
if (playState == FUSPlayStatePlaying) {
[self.recordOrPlayBtn setImage:[UIImage animatedImageNamed:@"zone_voice_sign_play_btn_icon_anim_" duration:1] forState:UIControlStateNormal];
} else {
[self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_voice_sign_play_btn_icon_anim_11"] forState:UIControlStateNormal];
}
}
@end @end
...@@ -145,6 +145,23 @@ ...@@ -145,6 +145,23 @@
<action selector="fus_clickRichBtnAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="o4D-g0-X13"/> <action selector="fus_clickRichBtnAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="o4D-g0-X13"/>
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HN9-sq-vX5">
<rect key="frame" x="251" y="-1.5" width="94" height="24"/>
<color key="backgroundColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="Bqb-k4-JKF"/>
<constraint firstAttribute="width" constant="94" id="C5h-0S-Dgv"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<inset key="titleEdgeInsets" minX="2" minY="0.0" maxX="0.0" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2" maxY="0.0"/>
<state key="normal" title="录制语音" image="zone_record_btn_img">
<color key="titleColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="clickRecordOrPlayBtnAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="VS5-ph-Sao"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="mHC-42-xJE" firstAttribute="trailing" secondItem="npl-JZ-Urd" secondAttribute="trailing" id="16u-YB-pDN"/> <constraint firstItem="mHC-42-xJE" firstAttribute="trailing" secondItem="npl-JZ-Urd" secondAttribute="trailing" id="16u-YB-pDN"/>
...@@ -167,7 +184,9 @@ ...@@ -167,7 +184,9 @@
<constraint firstItem="npl-JZ-Urd" firstAttribute="top" secondItem="zR6-f6-N6I" secondAttribute="bottom" constant="5" id="gBl-R3-Hq5"/> <constraint firstItem="npl-JZ-Urd" firstAttribute="top" secondItem="zR6-f6-N6I" secondAttribute="bottom" constant="5" id="gBl-R3-Hq5"/>
<constraint firstItem="W2o-3M-oQx" firstAttribute="centerY" secondItem="zR6-f6-N6I" secondAttribute="centerY" id="kQV-nT-JA5"/> <constraint firstItem="W2o-3M-oQx" firstAttribute="centerY" secondItem="zR6-f6-N6I" secondAttribute="centerY" id="kQV-nT-JA5"/>
<constraint firstItem="f9D-yI-ehB" firstAttribute="trailing" secondItem="taI-i1-CE8" secondAttribute="trailing" constant="10" id="lty-9j-RuO"/> <constraint firstItem="f9D-yI-ehB" firstAttribute="trailing" secondItem="taI-i1-CE8" secondAttribute="trailing" constant="10" id="lty-9j-RuO"/>
<constraint firstAttribute="trailing" secondItem="HN9-sq-vX5" secondAttribute="trailing" constant="15" id="oM9-dJ-WSc"/>
<constraint firstItem="c6T-X5-Rcg" firstAttribute="leading" secondItem="MP9-4C-psw" secondAttribute="trailing" constant="7" id="p9G-jM-HF1"/> <constraint firstItem="c6T-X5-Rcg" firstAttribute="leading" secondItem="MP9-4C-psw" secondAttribute="trailing" constant="7" id="p9G-jM-HF1"/>
<constraint firstItem="HN9-sq-vX5" firstAttribute="centerY" secondItem="zR6-f6-N6I" secondAttribute="centerY" id="swK-QK-1VZ"/>
<constraint firstItem="npl-JZ-Urd" firstAttribute="leading" secondItem="zR6-f6-N6I" secondAttribute="leading" id="tM9-f7-zLC"/> <constraint firstItem="npl-JZ-Urd" firstAttribute="leading" secondItem="zR6-f6-N6I" secondAttribute="leading" id="tM9-f7-zLC"/>
<constraint firstItem="zR6-f6-N6I" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="uht-dr-ICp"/> <constraint firstItem="zR6-f6-N6I" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="uht-dr-ICp"/>
</constraints> </constraints>
...@@ -181,6 +200,8 @@ ...@@ -181,6 +200,8 @@
<outlet property="idLabel" destination="npl-JZ-Urd" id="XpZ-0T-qur"/> <outlet property="idLabel" destination="npl-JZ-Urd" id="XpZ-0T-qur"/>
<outlet property="levelLabel" destination="W2o-3M-oQx" id="Vcd-hM-bqD"/> <outlet property="levelLabel" destination="W2o-3M-oQx" id="Vcd-hM-bqD"/>
<outlet property="nickNameLabel" destination="zR6-f6-N6I" id="CsQ-Il-Gks"/> <outlet property="nickNameLabel" destination="zR6-f6-N6I" id="CsQ-Il-Gks"/>
<outlet property="recordOrPlayBtn" destination="HN9-sq-vX5" id="9rc-A4-Ati"/>
<outlet property="recordOrPlayBtnWidthConstraint" destination="C5h-0S-Dgv" id="mbD-wP-rg8"/>
<outlet property="richBtn" destination="f9D-yI-ehB" id="bjD-M5-icF"/> <outlet property="richBtn" destination="f9D-yI-ehB" id="bjD-M5-icF"/>
<outlet property="richImageView" destination="taI-i1-CE8" id="pBZ-yJ-Bf8"/> <outlet property="richImageView" destination="taI-i1-CE8" id="pBZ-yJ-Bf8"/>
<outlet property="sexAndAgeButton" destination="Yif-2n-DuE" id="DYv-Nb-oO6"/> <outlet property="sexAndAgeButton" destination="Yif-2n-DuE" id="DYv-Nb-oO6"/>
...@@ -193,5 +214,6 @@ ...@@ -193,5 +214,6 @@
<image name="baofang_vchat_verified_img" width="41.5" height="13"/> <image name="baofang_vchat_verified_img" width="41.5" height="13"/>
<image name="video_chat_userinfo_sex_secret_bg" width="27.5" height="13"/> <image name="video_chat_userinfo_sex_secret_bg" width="27.5" height="13"/>
<image name="vip_icon_none_vip" width="13" height="13"/> <image name="vip_icon_none_vip" width="13" height="13"/>
<image name="zone_record_btn_img" width="12.5" height="14"/>
</resources> </resources>
</document> </document>
...@@ -95,28 +95,29 @@ ...@@ -95,28 +95,29 @@
[self fus_resetTagWithModel:zoneModel]; [self fus_resetTagWithModel:zoneModel];
if (FUSConfig.sharedInstanced.devConfigs.appStatus) { // if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
self.recordOrPlayBtn.hidden = YES; // self.recordOrPlayBtn.hidden = YES;
} else { // } else {
if ([NSDictionary isNull:zoneModel.voiceChat] || [zoneModel.voiceChat[@"status"] integerValue] == -1) { // if ([NSDictionary isNull:zoneModel.voiceChat] || [zoneModel.voiceChat[@"status"] integerValue] == -1) {
if (!isMyZone) { // if (!isMyZone) {
self.recordOrPlayBtn.hidden = YES; // self.recordOrPlayBtn.hidden = YES;
} else { // } else {
self.recordOrPlayBtn.hidden = NO; // self.recordOrPlayBtn.hidden = NO;
[self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_record_btn_img"] forState:UIControlStateNormal]; // [self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_record_btn_img"] forState:UIControlStateNormal];
[self.recordOrPlayBtn setTitle:[NSString fus_localString:@"录制语音"] forState:UIControlStateNormal]; // [self.recordOrPlayBtn setTitle:[NSString fus_localString:@"录制语音"] forState:UIControlStateNormal];
[self.recordOrPlayBtn sizeToFit]; // [self.recordOrPlayBtn sizeToFit];
//
self.recordOrPlayBtnWidthConstraint.constant = self.recordOrPlayBtn.width + 20; // self.recordOrPlayBtnWidthConstraint.constant = self.recordOrPlayBtn.width + 20;
} // }
} else { // } else {
self.recordOrPlayBtn.hidden = NO; // self.recordOrPlayBtn.hidden = NO;
self.recordOrPlayBtnWidthConstraint.constant = 78; // self.recordOrPlayBtnWidthConstraint.constant = 78;
NSString *timeStr = [NSString stringWithFormat:@"%@s",zoneModel.voiceChat[@"duration"]]; // NSString *timeStr = [NSString stringWithFormat:@"%@s",zoneModel.voiceChat[@"duration"]];
[self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_voice_sign_play_btn_icon_anim_11"] forState:UIControlStateNormal]; // [self.recordOrPlayBtn setImage:[UIImage imageNamed:@"zone_voice_sign_play_btn_icon_anim_11"] forState:UIControlStateNormal];
[self.recordOrPlayBtn setTitle:timeStr forState:UIControlStateNormal]; // [self.recordOrPlayBtn setTitle:timeStr forState:UIControlStateNormal];
} // }
} // }
self.recordOrPlayBtn.hidden = YES;
} }
- (IBAction)clickRecordOrPlayBtnAction:(UIButton *)sender { - (IBAction)clickRecordOrPlayBtnAction:(UIButton *)sender {
...@@ -276,15 +277,7 @@ ...@@ -276,15 +277,7 @@
CGRect signRect = [model.sign boundingRectWithSize:CGSizeMake(UIView.fus_screenW - 30, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fus_themeFont:12], NSFontAttributeName, nil] context:nil]; CGRect signRect = [model.sign boundingRectWithSize:CGSizeMake(UIView.fus_screenW - 30, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fus_themeFont:12], NSFontAttributeName, nil] context:nil];
height += signRect.size.height; height += signRect.size.height;
} }
if ((![NSDictionary isNull:model.voiceChat] && ![NSString isNull:model.voiceChat[@"url"]])
|| [model.uid isEqual:[FUSCacheDataShare shareStore].userDetailInfo.uid]) {
height += (15 + 24);
}
// 下面的空白区域
height += 25;
//这个不知道什么适配,导致下面空白很多
// if (!FUSConfig.sharedInstanced.devConfigs.appStatus // if (!FUSConfig.sharedInstanced.devConfigs.appStatus
// && ((![NSDictionary isNull:model.voiceChat] // && ((![NSDictionary isNull:model.voiceChat]
// && ![NSString isNull:model.voiceChat[@"url"]]) // && ![NSString isNull:model.voiceChat[@"url"]])
...@@ -292,6 +285,9 @@ ...@@ -292,6 +285,9 @@
// height += (15 + 24); // height += (15 + 24);
// } // }
// 下面的空白区域
height += 25;
return height; return height;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="嗨,我剛加入FuSi live,希望和" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HRk-An-Crf"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="嗨,我剛加入FuSi live,希望和" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HRk-An-Crf">
<rect key="frame" x="15" y="64" width="320" height="17"/> <rect key="frame" x="15" y="64" width="320" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c1Y-h5-wJy"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c1Y-h5-wJy">
<rect key="frame" x="15" y="96" width="94" height="24"/> <rect key="frame" x="15" y="100" width="94" height="24"/>
<color key="backgroundColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="displayP3"/> <color key="backgroundColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="displayP3"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="24" id="euz-nG-Q1O"/> <constraint firstAttribute="height" constant="24" id="euz-nG-Q1O"/>
......
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