提交
This commit is contained in:
@@ -8,20 +8,22 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXUserModel.h"
|
||||
#import "QXSeatHeaderView.h"
|
||||
#import "CKShimmerLabel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXExpansionCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIView *bgView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet QXSeatHeaderView *avatarImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *levelImgV;
|
||||
@property (weak, nonatomic) IBOutlet CKShimmerLabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *ageLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *followBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIView *imgsBgView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgsBgViewHeightCon;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *sexImageView;
|
||||
@property (nonatomic, strong) QXUserHomeModel *model;
|
||||
-(void)nameStartAnimate;
|
||||
-(void)nameStopAnimate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
make.size.mas_equalTo(CGSizeMake(imgWidth, imgWidth));
|
||||
}];
|
||||
}
|
||||
self.nameLabel.textColor = RGB16(0x212121);
|
||||
self.nameLabel.shimmerWidth = 20;
|
||||
self.nameLabel.shimmerRadius = 20;
|
||||
self.nameLabel.durationTime = 1;;
|
||||
self.nameLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
[self.nameLabel stopShimmer];
|
||||
}
|
||||
- (IBAction)chatAction:(id)sender {
|
||||
if (self.model.room_id.intValue > 0) {
|
||||
@@ -55,11 +61,13 @@
|
||||
self.avatarImgV.nobilityImageView.image = nil;
|
||||
}
|
||||
if ([model.nickname_color isExist]) {
|
||||
self.nicknameLab.textColor = [UIColor colorWithHexString:model.nickname_color];
|
||||
self.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color];
|
||||
// [self.nameLabel startShimmer];
|
||||
}else{
|
||||
self.nicknameLab.textColor = RGB16(0x212121);
|
||||
self.nameLabel.shimmerColor = [UIColor clearColor];
|
||||
// [self.nameLabel stopShimmer];
|
||||
}
|
||||
self.nicknameLab.text = model.nickname;
|
||||
self.nameLabel.text = model.nickname;
|
||||
self.ageLabel.text = [NSString stringWithFormat:@"%ld岁 ip属地: %@",[model.birthday ageWithDateOfBirth],model.loginip];
|
||||
CGFloat imgWidth = (SCREEN_WIDTH-16*2-12*2-10*2)/3;
|
||||
UIImageView *firstImgV = self.imgViewsArray.firstObject;
|
||||
@@ -112,6 +120,31 @@
|
||||
self.followBtn.selected = NO;
|
||||
}
|
||||
}
|
||||
-(void)nameStartAnimate{
|
||||
if ([self.model.nickname_color isExist]) {
|
||||
[self.nameLabel stopShimmer];
|
||||
[self.nameLabel layoutSubviews];
|
||||
self.nameLabel.shimmerWidth = 20;
|
||||
self.nameLabel.shimmerRadius = 20;
|
||||
self.nameLabel.durationTime = 1;
|
||||
self.nameLabel.shimmerColor = [UIColor colorWithHexString:self.model.nickname_color];
|
||||
[self.nameLabel startShimmer];
|
||||
}
|
||||
// else{
|
||||
// self.nameLabel.shimmerColor = [UIColor clearColor];
|
||||
// [self.nameLabel stopShimmer];
|
||||
// }
|
||||
}
|
||||
-(void)nameStopAnimate{
|
||||
if ([self.model.nickname_color isExist]) {
|
||||
self.nameLabel.shimmerColor = [UIColor colorWithHexString:self.model.nickname_color];
|
||||
[self.nameLabel stopShimmer];
|
||||
}
|
||||
// else{
|
||||
// self.nameLabel.shimmerColor = [UIColor clearColor];
|
||||
// [self.nameLabel stopShimmer];
|
||||
// }
|
||||
}
|
||||
|
||||
-(void)previewPhotoWithCurrentIndex:(NSInteger)currentIndex{
|
||||
NSArray *images = [self.model.home_bgimages componentsSeparatedByString:@","];
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="184" id="BqF-kO-8SX" customClass="QXExpansionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="371" height="95"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="95"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="BqF-kO-8SX" id="ktB-xa-Y8j">
|
||||
<rect key="frame" x="0.0" y="0.0" width="371" height="95"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="95"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d7u-yz-ciJ">
|
||||
<rect key="frame" x="16" y="6" width="339" height="83"/>
|
||||
<rect key="frame" x="16" y="6" width="343" height="83"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ij8-0l-yjh">
|
||||
<rect key="frame" x="12" y="12" width="50" height="60"/>
|
||||
@@ -35,37 +35,18 @@
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SRz-S8-eVY" customClass="QXSeatHeaderView">
|
||||
<rect key="frame" x="12" y="12" width="50" height="60"/>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8cq-E3-DvJ">
|
||||
<rect key="frame" x="93" y="20" width="40" height="18"/>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DJ0-UX-5S2" customClass="CKShimmerLabel">
|
||||
<rect key="frame" x="93" y="20" width="155" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="qwD-PD-2sr"/>
|
||||
<constraint firstAttribute="height" constant="18" id="YBf-fM-mcV"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gIi-P2-Y9S">
|
||||
<rect key="frame" x="139" y="21" width="42" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="42" id="Pa0-JD-WZI"/>
|
||||
<constraint firstAttribute="height" constant="16" id="nev-GJ-TTd"/>
|
||||
</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="SfJ-0f-fTV">
|
||||
<rect key="frame" x="72" y="46" width="31.666666666666671" height="14.666666666666664"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14.67" id="ZBE-6b-COh"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</view>
|
||||
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="01B-he-W7N">
|
||||
<rect key="frame" x="12" y="12" width="100" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</button>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WzX-5h-Rjx">
|
||||
<rect key="frame" x="254" y="29" width="73" height="26"/>
|
||||
<rect key="frame" x="258" y="29" width="73" height="26"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="73" id="xrz-si-tcM"/>
|
||||
<constraint firstAttribute="height" constant="26" id="zly-Ov-2fX"/>
|
||||
@@ -83,7 +64,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aff-rQ-ltL">
|
||||
<rect key="frame" x="12" y="81" width="315" height="0.0"/>
|
||||
<rect key="frame" x="12" y="81" width="319" height="0.0"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" id="HM6-cc-JXk"/>
|
||||
@@ -96,14 +77,23 @@
|
||||
<constraint firstAttribute="height" constant="16" id="txd-O6-q3p"/>
|
||||
</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="SfJ-0f-fTV">
|
||||
<rect key="frame" x="72" y="46" width="31.666666666666671" height="14.666666666666664"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14.67" id="ZBE-6b-COh"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="DJ0-UX-5S2" firstAttribute="leading" secondItem="rE2-Ub-cG3" secondAttribute="trailing" constant="5" id="21A-eM-Lns"/>
|
||||
<constraint firstItem="SRz-S8-eVY" firstAttribute="top" secondItem="ij8-0l-yjh" secondAttribute="top" id="5SH-Nr-W30"/>
|
||||
<constraint firstItem="SRz-S8-eVY" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="leading" id="5xK-a1-AgP"/>
|
||||
<constraint firstItem="aff-rQ-ltL" firstAttribute="leading" secondItem="d7u-yz-ciJ" secondAttribute="leading" constant="12" id="7W3-i0-a7h"/>
|
||||
<constraint firstItem="ij8-0l-yjh" firstAttribute="top" secondItem="d7u-yz-ciJ" secondAttribute="top" constant="12" id="7rj-T2-7ef"/>
|
||||
<constraint firstItem="gIi-P2-Y9S" firstAttribute="leading" secondItem="8cq-E3-DvJ" secondAttribute="trailing" constant="6" id="9a3-JM-DNn"/>
|
||||
<constraint firstItem="SfJ-0f-fTV" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="trailing" constant="10" id="LpR-OW-ApF"/>
|
||||
<constraint firstItem="SRz-S8-eVY" firstAttribute="bottom" secondItem="ij8-0l-yjh" secondAttribute="bottom" id="PL9-sW-Etp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aff-rQ-ltL" secondAttribute="trailing" constant="12" id="UJy-KH-Me6"/>
|
||||
@@ -111,11 +101,10 @@
|
||||
<constraint firstItem="rE2-Ub-cG3" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="trailing" constant="10" id="Vpj-sb-ZIl"/>
|
||||
<constraint firstItem="aff-rQ-ltL" firstAttribute="top" secondItem="ij8-0l-yjh" secondAttribute="bottom" constant="9" id="gpK-ex-dHB"/>
|
||||
<constraint firstItem="WzX-5h-Rjx" firstAttribute="centerY" secondItem="ij8-0l-yjh" secondAttribute="centerY" id="lzk-gK-Xr5"/>
|
||||
<constraint firstItem="8cq-E3-DvJ" firstAttribute="centerY" secondItem="rE2-Ub-cG3" secondAttribute="centerY" id="mVr-ao-77e"/>
|
||||
<constraint firstItem="SfJ-0f-fTV" firstAttribute="top" secondItem="8cq-E3-DvJ" secondAttribute="bottom" constant="8" symbolic="YES" id="pb7-FA-QT6"/>
|
||||
<constraint firstItem="gIi-P2-Y9S" firstAttribute="centerY" secondItem="8cq-E3-DvJ" secondAttribute="centerY" id="qez-UP-KMH"/>
|
||||
<constraint firstItem="SRz-S8-eVY" firstAttribute="trailing" secondItem="ij8-0l-yjh" secondAttribute="trailing" id="sL4-bA-4lX"/>
|
||||
<constraint firstItem="8cq-E3-DvJ" firstAttribute="leading" secondItem="rE2-Ub-cG3" secondAttribute="trailing" constant="5" id="xsB-a1-v4y"/>
|
||||
<constraint firstItem="DJ0-UX-5S2" firstAttribute="centerY" secondItem="rE2-Ub-cG3" secondAttribute="centerY" id="sZI-KB-uHW"/>
|
||||
<constraint firstItem="SfJ-0f-fTV" firstAttribute="top" secondItem="rE2-Ub-cG3" secondAttribute="bottom" constant="9" id="t10-Md-7eL"/>
|
||||
<constraint firstItem="WzX-5h-Rjx" firstAttribute="leading" secondItem="DJ0-UX-5S2" secondAttribute="trailing" constant="10" id="vCf-Pq-QOS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="WzX-5h-Rjx" secondAttribute="trailing" constant="12" id="yE0-Ql-MBm"/>
|
||||
<constraint firstItem="ij8-0l-yjh" firstAttribute="top" secondItem="rE2-Ub-cG3" secondAttribute="bottom" constant="-25" id="yi3-el-D4c"/>
|
||||
</constraints>
|
||||
@@ -142,8 +131,7 @@
|
||||
<outlet property="followBtn" destination="WzX-5h-Rjx" id="c7X-9W-ZDG"/>
|
||||
<outlet property="imgsBgView" destination="aff-rQ-ltL" id="iQp-mS-jyp"/>
|
||||
<outlet property="imgsBgViewHeightCon" destination="HM6-cc-JXk" id="rZb-Ea-rwx"/>
|
||||
<outlet property="levelImgV" destination="gIi-P2-Y9S" id="74c-sq-nRX"/>
|
||||
<outlet property="nicknameLab" destination="8cq-E3-DvJ" id="sfo-Gt-g93"/>
|
||||
<outlet property="nameLabel" destination="DJ0-UX-5S2" id="f5N-Fb-M5y"/>
|
||||
<outlet property="sexImageView" destination="rE2-Ub-cG3" id="zbU-Lq-BLy"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="216.03053435114504" y="132.04225352112678"/>
|
||||
|
||||
Reference in New Issue
Block a user