爵位完成

This commit is contained in:
启星
2025-11-11 17:19:21 +08:00
parent 406c481ba4
commit 7ac937ddbf
136 changed files with 3492 additions and 89 deletions

View File

@@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface QXEmojiCell : UICollectionViewCell
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UIView *nobilityLockView;
@property (nonatomic,strong)QXEmojiModel *model;
@end

View File

@@ -17,5 +17,10 @@
_model = model;
self.titleLabel.text = model.name;
[self.imageView sd_setImageWithURL:[NSURL URLWithString:model.image]];
if (model.is_lock.intValue == 1) {
self.nobilityLockView.hidden = NO;
}else{
self.nobilityLockView.hidden = YES;
}
}
@end

View File

@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -29,13 +28,33 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="LlC-Kp-7ty">
<rect key="frame" x="0.0" y="0.0" width="265" height="255"/>
</imageView>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4xH-Q6-Jmm">
<rect key="frame" x="0.0" y="0.0" width="265" height="273"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="nobility_gift_lock" translatesAutoresizingMaskIntoConstraints="NO" id="mZc-fM-hpH">
<rect key="frame" x="106.66666666666669" y="116" width="52" height="41"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="98C-6r-KEp"/>
<constraint firstAttribute="width" constant="52" id="mNC-4E-kvY"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.9137254901960784" green="0.9137254901960784" blue="0.9137254901960784" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="mZc-fM-hpH" firstAttribute="centerX" secondItem="4xH-Q6-Jmm" secondAttribute="centerX" id="4A5-yV-H2C"/>
<constraint firstItem="mZc-fM-hpH" firstAttribute="centerY" secondItem="4xH-Q6-Jmm" secondAttribute="centerY" id="pzL-kl-Ieb"/>
</constraints>
</view>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Het-BN-kc9" secondAttribute="bottom" id="2BG-mC-FaO"/>
<constraint firstItem="LlC-Kp-7ty" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="2qv-XJ-xHU"/>
<constraint firstItem="4xH-Q6-Jmm" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="6pC-8e-yaG"/>
<constraint firstAttribute="trailing" secondItem="LlC-Kp-7ty" secondAttribute="trailing" id="D6X-gv-ZCy"/>
<constraint firstAttribute="trailing" secondItem="4xH-Q6-Jmm" secondAttribute="trailing" id="E65-Lv-Tqz"/>
<constraint firstAttribute="bottom" secondItem="4xH-Q6-Jmm" secondAttribute="bottom" id="Gz6-33-zUQ"/>
<constraint firstItem="4xH-Q6-Jmm" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="Ie6-fv-iJi"/>
<constraint firstAttribute="trailing" secondItem="Het-BN-kc9" secondAttribute="trailing" id="NMN-es-X8p"/>
<constraint firstItem="LlC-Kp-7ty" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="eud-aw-Nov"/>
<constraint firstItem="Het-BN-kc9" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="gQo-iX-ukL"/>
@@ -44,9 +63,13 @@
<size key="customSize" width="265" height="273"/>
<connections>
<outlet property="imageView" destination="LlC-Kp-7ty" id="ZPe-C3-RBQ"/>
<outlet property="nobilityLockView" destination="4xH-Q6-Jmm" id="Tk2-UX-vht"/>
<outlet property="titleLabel" destination="Het-BN-kc9" id="lDC-MQ-3fj"/>
</connections>
<point key="canvasLocation" x="303.05343511450383" y="98.239436619718319"/>
</collectionViewCell>
</objects>
<resources>
<image name="nobility_gift_lock" width="52" height="41"/>
</resources>
</document>

View File

@@ -76,6 +76,10 @@
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
QXEmojiModel *md = self.dataArray[indexPath.row];
if (md.is_lock.intValue == 1) {
showToast(@"请先开通爵位");
return;
}
QXEmojiModel *result = [self randomResultWithEmoji:md];
if (self.delegate && [self.delegate respondsToSelector:@selector(didSelectedEmoji:)]) {
[self.delegate didSelectedEmoji:result];