提交
This commit is contained in:
27
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmCell.h
Executable file
27
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmCell.h
Executable file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// GMMicCharmCell.h
|
||||
// romantic
|
||||
//
|
||||
// Created by MAC on 2022/12/29.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "GMMicCharmModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GMMicCharmCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *valueLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *IDLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *gxImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *mlImgV;
|
||||
|
||||
@property (nonatomic, strong) GMMicCharmModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
28
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmCell.m
Executable file
28
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmCell.m
Executable file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// GMMicCharmCell.m
|
||||
// romantic
|
||||
//
|
||||
// Created by MAC on 2022/12/29.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GMMicCharmCell.h"
|
||||
|
||||
@implementation GMMicCharmCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
- (void)setModel:(GMMicCharmModel *)model {
|
||||
_model = model;
|
||||
|
||||
[self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nameLabel.text = model.nick_name;
|
||||
self.valueLabel.text = model.change_value;
|
||||
self.IDLab.text = [NSString stringWithFormat:@"ID:%@", model.uid];
|
||||
[self.gxImgV sd_setImageWithURL:[NSURL URLWithString:model.contribution_level_image]];
|
||||
[self.mlImgV sd_setImageWithURL:[NSURL URLWithString:model.charm_level_image]];
|
||||
}
|
||||
|
||||
@end
|
||||
99
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmCell.xib
Executable file
99
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmCell.xib
Executable file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="56" id="KGk-i7-Jjw" customClass="GMMicCharmCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mp1-v1-3M7">
|
||||
<rect key="frame" x="15" y="14" width="42" height="42"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="42" id="QGK-D3-awu"/>
|
||||
<constraint firstAttribute="width" constant="42" id="ipy-e6-AJN"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="21"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="亮亮" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qzl-Rn-z1a">
|
||||
<rect key="frame" x="70" y="17" width="29" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vm3-we-0oH">
|
||||
<rect key="frame" x="351" y="26.5" width="9" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="room_charm_fire" translatesAutoresizingMaskIntoConstraints="NO" id="dUi-jc-LDn">
|
||||
<rect key="frame" x="336" y="28.5" width="10" height="13"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ID:12345" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i4a-Em-wpu">
|
||||
<rect key="frame" x="70" y="40" width="49" height="13.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="0.60318678252551017" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f1Y-GI-CVo">
|
||||
<rect key="frame" x="104" y="15.5" width="40" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="cYu-1N-OhU"/>
|
||||
<constraint firstAttribute="width" constant="40" id="jJl-yY-NOo"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gsf-To-Bpy">
|
||||
<rect key="frame" x="147" y="15.5" width="40" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="Fmx-eQ-dNX"/>
|
||||
<constraint firstAttribute="height" constant="20" id="QVv-cB-6Xp"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="mp1-v1-3M7" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="344-eP-P9W"/>
|
||||
<constraint firstItem="dUi-jc-LDn" firstAttribute="centerY" secondItem="Vm3-we-0oH" secondAttribute="centerY" id="62D-t3-sqI"/>
|
||||
<constraint firstItem="gsf-To-Bpy" firstAttribute="centerY" secondItem="f1Y-GI-CVo" secondAttribute="centerY" id="T2w-ma-J60"/>
|
||||
<constraint firstItem="qzl-Rn-z1a" firstAttribute="top" secondItem="mp1-v1-3M7" secondAttribute="top" constant="3" id="XrI-lJ-wCU"/>
|
||||
<constraint firstItem="i4a-Em-wpu" firstAttribute="top" secondItem="qzl-Rn-z1a" secondAttribute="bottom" constant="6" id="bn9-YW-xeJ"/>
|
||||
<constraint firstItem="qzl-Rn-z1a" firstAttribute="leading" secondItem="mp1-v1-3M7" secondAttribute="trailing" constant="13" id="dvr-Wk-OVf"/>
|
||||
<constraint firstItem="gsf-To-Bpy" firstAttribute="leading" secondItem="f1Y-GI-CVo" secondAttribute="trailing" constant="3" id="esa-vW-yeJ"/>
|
||||
<constraint firstItem="mp1-v1-3M7" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="gP2-Ol-4t8"/>
|
||||
<constraint firstItem="f1Y-GI-CVo" firstAttribute="leading" secondItem="qzl-Rn-z1a" secondAttribute="trailing" constant="5" id="jEV-gz-aa7"/>
|
||||
<constraint firstItem="f1Y-GI-CVo" firstAttribute="centerY" secondItem="qzl-Rn-z1a" secondAttribute="centerY" id="jzW-Vp-Tli"/>
|
||||
<constraint firstItem="Vm3-we-0oH" firstAttribute="leading" secondItem="dUi-jc-LDn" secondAttribute="trailing" constant="5" id="o2J-gl-Kzp"/>
|
||||
<constraint firstItem="Vm3-we-0oH" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="oyw-FI-dex"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Vm3-we-0oH" secondAttribute="trailing" constant="15" id="wPl-G0-9Gx"/>
|
||||
<constraint firstItem="i4a-Em-wpu" firstAttribute="leading" secondItem="qzl-Rn-z1a" secondAttribute="leading" id="yhn-a5-ruU"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="IDLab" destination="i4a-Em-wpu" id="rik-68-irD"/>
|
||||
<outlet property="gxImgV" destination="f1Y-GI-CVo" id="7A8-da-h2Q"/>
|
||||
<outlet property="iconImageView" destination="mp1-v1-3M7" id="7iQ-24-n0y"/>
|
||||
<outlet property="mlImgV" destination="gsf-To-Bpy" id="T4V-uV-Oft"/>
|
||||
<outlet property="nameLabel" destination="qzl-Rn-z1a" id="AyZ-vb-CU8"/>
|
||||
<outlet property="valueLabel" destination="Vm3-we-0oH" id="9L0-7X-qha"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="37" y="185"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="room_charm_fire" width="10" height="13"/>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmModel.h
Normal file
24
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// GMMicCharmModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by MAC on 2024/3/5.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GMMicCharmModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *uid;
|
||||
@property (nonatomic, copy) NSString *nick_name;
|
||||
@property (nonatomic, copy) NSString *head_pic;
|
||||
@property (nonatomic, copy) NSString *change_value;
|
||||
@property (nonatomic, copy) NSString *contribution_level_image;
|
||||
@property (nonatomic, copy) NSString *charm_level_image;
|
||||
@property (nonatomic, copy) NSString *nobility_image;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmModel.m
Normal file
12
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// GMMicCharmModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by MAC on 2024/3/5.
|
||||
//
|
||||
|
||||
#import "GMMicCharmModel.h"
|
||||
|
||||
@implementation GMMicCharmModel
|
||||
|
||||
@end
|
||||
22
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmView.h
Executable file
22
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmView.h
Executable file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// GMMicCharmView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GMMicCharmView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
|
||||
- (void)onFetchDataWith:(NSString *)uid rid:(NSString *)rid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
72
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmView.m
Executable file
72
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmView.m
Executable file
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// GMMicCharmView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import "GMMicCharmView.h"
|
||||
#import "GMMicCharmCell.h"
|
||||
|
||||
@interface GMMicCharmView () <UITableViewDataSource, UITableViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) NSArray *dataArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation GMMicCharmView
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
- (void)onFetchDataWith:(NSString *)uid rid:(NSString *)rid {
|
||||
NSDictionary *params = @{@"user_id":uid, @"rid":rid};
|
||||
[AFNetworkRequset.shared postRequestWithParams:params Path:@"/api/room_micro/get_room_micro_charm_list" Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
|
||||
NSArray *arr = [GMMicCharmModel mj_objectArrayWithKeyValuesArray:responseDic[@"data"]];
|
||||
self.dataArray = arr;
|
||||
[self.tableView reloadData];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
self.tableView.separatorStyle = NO;
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
[self.tableView registerNib:[UINib nibWithNibName:@"GMMicCharmCell" bundle:nil] forCellReuseIdentifier:@"GMMicCharmCell"];
|
||||
self.tableView.rowHeight = 70;
|
||||
}
|
||||
|
||||
- (IBAction)onDismiss:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
GMMicCharmCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GMMicCharmCell" forIndexPath:indexPath];
|
||||
cell.selectionStyle = NO;
|
||||
GMMicCharmModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
@end
|
||||
89
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmView.xib
Executable file
89
SweetParty/主类/音悦新增/麦位弹框子列表/GMMicCharmView.xib
Executable file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="GMMicCharmView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="iOi-zt-Uy5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.50463680345184947" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PzA-fC-a6k">
|
||||
<rect key="frame" x="0.0" y="483" width="414" height="413"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="spi-fw-0TT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="413"/>
|
||||
</imageView>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="HLR-ha-zFy">
|
||||
<rect key="frame" x="0.0" y="48" width="414" height="365"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pro-bV-rEz">
|
||||
<rect key="frame" x="7" y="14" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="1iE-KY-Fxg"/>
|
||||
<constraint firstAttribute="height" constant="30" id="RR4-H2-8ic"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="whiteBack"/>
|
||||
<connections>
|
||||
<action selector="onDismiss:" destination="iN0-l3-epB" eventType="touchUpInside" id="esP-XN-u1c"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="魅力值详情" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YsJ-0e-UF3">
|
||||
<rect key="frame" x="166" y="19.5" width="82" height="19.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="HLR-ha-zFy" secondAttribute="bottom" id="428-WV-AXp"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" id="5DF-0X-SX5"/>
|
||||
<constraint firstItem="HLR-ha-zFy" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="48" id="5k2-f5-x62"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" constant="7" id="9Ui-UW-vzG"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="14" id="N1M-y7-9Ln"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerY" secondItem="Pro-bV-rEz" secondAttribute="centerY" id="TIE-OD-etW"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="V4H-0g-x5k"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HLR-ha-zFy" secondAttribute="trailing" id="WXx-Yx-Oq7"/>
|
||||
<constraint firstItem="HLR-ha-zFy" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="iuI-zX-IDy"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerX" secondItem="PzA-fC-a6k" secondAttribute="centerX" id="j9w-sf-Pxi"/>
|
||||
<constraint firstAttribute="bottom" secondItem="spi-fw-0TT" secondAttribute="bottom" id="jcq-og-Vfg"/>
|
||||
<constraint firstAttribute="height" constant="413" id="sdD-kW-q9q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="spi-fw-0TT" secondAttribute="trailing" id="uQV-rG-Aew"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="PzA-fC-a6k" secondAttribute="bottom" id="9Qz-br-nwq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PzA-fC-a6k" secondAttribute="trailing" id="CMa-9H-ZNA"/>
|
||||
<constraint firstItem="PzA-fC-a6k" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="QrX-RW-SNp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iOi-zt-Uy5" secondAttribute="trailing" id="auO-5z-Ce6"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="k2y-8M-4VZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="iOi-zt-Uy5" secondAttribute="bottom" id="mdX-U3-TGT"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="wI1-hD-BeC"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="HLR-ha-zFy" id="8h1-dS-jyE"/>
|
||||
<outlet property="titleLab" destination="YsJ-0e-UF3" id="JMh-cT-buS"/>
|
||||
<outlet property="touchImgV" destination="iOi-zt-Uy5" id="9H4-Zl-aAc"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132" y="91"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="common_alert_bg" width="375" height="413"/>
|
||||
<image name="whiteBack" width="8" height="16"/>
|
||||
</resources>
|
||||
</document>
|
||||
23
SweetParty/主类/音悦新增/麦位弹框子列表/LMDeleteMiyouAlertView.h
Normal file
23
SweetParty/主类/音悦新增/麦位弹框子列表/LMDeleteMiyouAlertView.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// LMDeleteMiyouAlertView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/8.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^deleteSucessBlcok)(void);
|
||||
@interface LMDeleteMiyouAlertView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSString *fid;
|
||||
|
||||
@property (nonatomic, copy) deleteSucessBlcok sucBlock;
|
||||
- (void)sheetViewforViewAppear;
|
||||
- (void)sheetViewforViewClose;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
67
SweetParty/主类/音悦新增/麦位弹框子列表/LMDeleteMiyouAlertView.m
Normal file
67
SweetParty/主类/音悦新增/麦位弹框子列表/LMDeleteMiyouAlertView.m
Normal file
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// LMDeleteMiyouAlertView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/8.
|
||||
//
|
||||
|
||||
#import "LMDeleteMiyouAlertView.h"
|
||||
|
||||
@interface LMDeleteMiyouAlertView ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
||||
@property (weak, nonatomic) IBOutlet UIView *mineView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMDeleteMiyouAlertView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.confirmButton.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(125, 44) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
||||
self.mineView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-30, 166) direction:FXGradientChangeDirectionHorizontal startColor:HEXCOLOR(0xDFFFF6) endColor:HEXCOLOR(0xFFFFFF)];
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"清除此关系需要%@钻",GVUSER.del_user_relation_money];
|
||||
}
|
||||
|
||||
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
||||
|
||||
[BJHttpTool BJ_Del_user_relationWithParameters:@{@"user_relation_id":self.fid} success:^(id response) {
|
||||
[HelpPageDefine showMessage:response[@"msg"]];
|
||||
if (self.sucBlock){
|
||||
self.sucBlock();
|
||||
}
|
||||
[self sheetViewforViewClose];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)cancelButtonClick:(UIButton *)sender {
|
||||
[self sheetViewforViewClose];
|
||||
}
|
||||
|
||||
- (void)sheetViewforViewAppear
|
||||
{
|
||||
//滑出动画
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.mineView.frame = CGRectMake(0, 0, ScreenWidth, self.mineView.height);
|
||||
} completion:^(BOOL finished) {
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)sheetViewforViewClose
|
||||
{
|
||||
self.backgroundColor = HEXCOLORA(0x000000, 0);
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight);
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
118
SweetParty/主类/音悦新增/麦位弹框子列表/LMDeleteMiyouAlertView.xib
Normal file
118
SweetParty/主类/音悦新增/麦位弹框子列表/LMDeleteMiyouAlertView.xib
Normal file
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" 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="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMDeleteMiyouAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dlm-3M-Tq1">
|
||||
<rect key="frame" x="15" y="323" width="345" height="166"/>
|
||||
<subviews>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="miyou_delete_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="DmX-1d-ZjU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="166"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您是否确认要清除" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7RE-Sy-Z2Q">
|
||||
<rect key="frame" x="107.33333333333333" y="54.666666666666693" width="130.66666666666669" height="19.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="清除此关系需要50钻" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6J4-nH-HTX">
|
||||
<rect key="frame" x="87.333333333333329" y="15.000000000000002" width="170.33333333333337" height="21.666666666666671"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Fa-gh-sjz">
|
||||
<rect key="frame" x="30" y="107" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="BSI-a3-D9D"/>
|
||||
<constraint firstAttribute="width" constant="125" id="ScK-T7-cIS"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="取消">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="qq6-fF-Tok"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FVo-Lu-ZtI">
|
||||
<rect key="frame" x="190" y="107" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.050980392156862744" green="1" blue="0.72549019607843135" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="125" id="FWH-C7-f8R"/>
|
||||
<constraint firstAttribute="height" constant="44" id="eqx-h9-rSq"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="确认">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="confirmButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="G5j-pS-YK4"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="6J4-nH-HTX" firstAttribute="top" secondItem="dlm-3M-Tq1" secondAttribute="top" constant="15" id="06K-y3-6ya"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FVo-Lu-ZtI" secondAttribute="trailing" constant="30" id="17h-NS-CU6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DmX-1d-ZjU" secondAttribute="trailing" id="JfG-mH-Uqh"/>
|
||||
<constraint firstItem="7RE-Sy-Z2Q" firstAttribute="centerX" secondItem="dlm-3M-Tq1" secondAttribute="centerX" id="PVb-2I-W7n"/>
|
||||
<constraint firstItem="7RE-Sy-Z2Q" firstAttribute="top" secondItem="6J4-nH-HTX" secondAttribute="bottom" constant="18" id="Vjs-9B-MB9"/>
|
||||
<constraint firstItem="3Fa-gh-sjz" firstAttribute="leading" secondItem="dlm-3M-Tq1" secondAttribute="leading" constant="30" id="XOD-c3-Aij"/>
|
||||
<constraint firstAttribute="bottom" secondItem="FVo-Lu-ZtI" secondAttribute="bottom" constant="15" id="fd8-dS-y2u"/>
|
||||
<constraint firstAttribute="height" constant="166" id="fk2-H5-oAY"/>
|
||||
<constraint firstItem="DmX-1d-ZjU" firstAttribute="top" secondItem="dlm-3M-Tq1" secondAttribute="top" id="hds-xb-olw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DmX-1d-ZjU" secondAttribute="bottom" id="pNE-0E-nlK"/>
|
||||
<constraint firstItem="DmX-1d-ZjU" firstAttribute="leading" secondItem="dlm-3M-Tq1" secondAttribute="leading" id="tip-8C-ZHr"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3Fa-gh-sjz" secondAttribute="bottom" constant="15" id="vsV-jX-X8r"/>
|
||||
<constraint firstItem="6J4-nH-HTX" firstAttribute="centerX" secondItem="dlm-3M-Tq1" secondAttribute="centerX" id="wEt-1d-LJl"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="dlm-3M-Tq1" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="M16-vB-ubi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dlm-3M-Tq1" secondAttribute="trailing" constant="15" id="VNJ-cM-Lev"/>
|
||||
<constraint firstItem="dlm-3M-Tq1" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="ckc-Jb-6aG"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="confirmButton" destination="FVo-Lu-ZtI" id="YaU-et-gJr"/>
|
||||
<outlet property="mineView" destination="dlm-3M-Tq1" id="axm-hw-mb9"/>
|
||||
<outlet property="titleLabel" destination="6J4-nH-HTX" id="chR-g5-tbH"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132" y="-11"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="miyou_delete_alert_bg" width="348" height="195"/>
|
||||
</resources>
|
||||
</document>
|
||||
25
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertGiftView.h
Executable file
25
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertGiftView.h
Executable file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// YYMicAlertGiftView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BJOperationAlertUserModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYMicAlertGiftView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
|
||||
@property (weak, nonatomic) IBOutlet UIView *titleBgView;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
|
||||
|
||||
@property (nonatomic, strong) BJOperationAlertUserModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
188
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertGiftView.m
Executable file
188
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertGiftView.m
Executable file
@@ -0,0 +1,188 @@
|
||||
//
|
||||
// YYMicAlertGiftView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import "YYMicAlertGiftView.h"
|
||||
#import "SPHomepageGiftCell.h"
|
||||
|
||||
@interface YYMicAlertGiftView () <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, JXCategoryViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) NSArray *titles;
|
||||
@property (nonatomic, strong) JXCategoryTitleView *categoryView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArray;
|
||||
@property (nonatomic, assign) NSInteger page;
|
||||
|
||||
@property (nonatomic, assign) NSInteger currentIndex;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYMicAlertGiftView
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
self.titles = @[@"已点亮", @"未点亮"];
|
||||
|
||||
self.dataArray = [NSMutableArray arrayWithCapacity:0];
|
||||
self.page = 1;
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
- (void)fetchData {
|
||||
NSString *urlStr = @"";
|
||||
if (0 == self.currentIndex) {
|
||||
urlStr = @"/api/user/get_user_illume_gift_wall";
|
||||
}else {
|
||||
urlStr = @"/api/user/get_user_unillume_gift_wall";
|
||||
}
|
||||
NSDictionary *params = @{@"user_id":C_string(self.model.uid), @"page":@(self.page), @"page_limit":@"1000"};
|
||||
[AFNetworkRequset.shared postRequestWithParams:params Path:urlStr Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
|
||||
if (self.page == 1) {
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
[self endRefresh];
|
||||
|
||||
NSArray *arr = [SPHomepageGiftModel mj_objectArrayWithKeyValuesArray:responseDic[@"data"]];
|
||||
[self.dataArray addObjectsFromArray:arr];
|
||||
[self.collectionView reloadData];
|
||||
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
[self endRefresh];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
[self.titleBgView addSubview:self.categoryView];
|
||||
[self.categoryView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.centerY.mas_equalTo(0);
|
||||
make.width.mas_equalTo(215);
|
||||
make.height.mas_equalTo(32);
|
||||
}];
|
||||
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
CGFloat itemW = (ScreenWidth-15*2-15*2)/3;
|
||||
layout.itemSize = CGSizeMake(itemW, 131);
|
||||
layout.minimumInteritemSpacing = 15;
|
||||
layout.minimumLineSpacing = 15;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 34, 15);
|
||||
|
||||
_collectionView.collectionViewLayout = layout;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
[_collectionView registerNib:[UINib nibWithNibName:@"SPHomepageGiftCell" bundle:nil] forCellWithReuseIdentifier:@"SPHomepageGiftCell"];
|
||||
|
||||
//刷新加载
|
||||
self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshFetchData)];
|
||||
self.collectionView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(fetchMoreData)];
|
||||
}
|
||||
|
||||
- (void)refreshFetchData {
|
||||
self.page = 1;
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (void)fetchMoreData {
|
||||
self.page ++;
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (void)endRefresh {
|
||||
if ([self.collectionView.mj_header isRefreshing]) {
|
||||
[self.collectionView.mj_header endRefreshing];
|
||||
} else if ([self.collectionView.mj_footer isRefreshing]) {
|
||||
[self.collectionView.mj_footer endRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setModel:(BJOperationAlertUserModel *)model {
|
||||
_model = model;
|
||||
|
||||
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab.text = model.nick_name;
|
||||
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (IBAction)onDismiss:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark -------- collectionView代理方法 ------
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
SPHomepageGiftCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"SPHomepageGiftCell" forIndexPath:indexPath];
|
||||
cell.nameLab.textColor = cell.priceLab.textColor = kWhiteColor;
|
||||
|
||||
SPHomepageGiftModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
if (0 == self.currentIndex) {
|
||||
cell.bgImgV.image = ImageNamed(@"");
|
||||
cell.bgImgV.backgroundColor = HEXCOLORA(0xFFFFFF, 0.06);
|
||||
cell.numBgView.hidden = cell.maxHeadImgV.hidden = NO;
|
||||
cell.contentView.alpha = 1;
|
||||
}else {
|
||||
cell.bgImgV.image = ImageNamed(@"");
|
||||
cell.bgImgV.backgroundColor = HEXCOLORA(0xFFFFFF, 0.06);
|
||||
cell.numBgView.hidden = cell.maxHeadImgV.hidden = YES;
|
||||
cell.contentView.alpha = 0.6;
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
self.currentIndex = index;
|
||||
[self refreshFetchData];
|
||||
}
|
||||
|
||||
// 分页菜单视图
|
||||
- (JXCategoryTitleView *)categoryView {
|
||||
if (!_categoryView) {
|
||||
_categoryView = [[JXCategoryTitleView alloc] init];
|
||||
_categoryView.delegate = self;
|
||||
_categoryView.titleFont = YBBoldFont(14);
|
||||
_categoryView.titleSelectedFont = YBBoldFont(14);
|
||||
_categoryView.titleColor = HEXCOLOR(0xCCCCCC);
|
||||
_categoryView.titleSelectedColor = HEXCOLOR(0x333333);
|
||||
_categoryView.cellSpacing = 64;
|
||||
_categoryView.averageCellSpacingEnabled = NO;
|
||||
_categoryView.contentEdgeInsetLeft = 32;
|
||||
_categoryView.contentEdgeInsetRight = 32;
|
||||
_categoryView.backgroundColor = HEXCOLORA(0xFFFFFF, 0.1);
|
||||
_categoryView.layer.cornerRadius = 16;
|
||||
_categoryView.layer.masksToBounds = YES;
|
||||
|
||||
_categoryView.titles = self.titles;
|
||||
|
||||
JXCategoryIndicatorBackgroundView *backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init];
|
||||
backgroundView.indicatorWidth = 95;
|
||||
backgroundView.indicatorHeight = 28;
|
||||
backgroundView.indicatorCornerRadius = 14;
|
||||
backgroundView.indicatorColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 28) direction:FXGradientChangeDirectionHorizontal startColor:mainLightColor endColor:mainDeepColor];
|
||||
_categoryView.indicators = @[backgroundView];
|
||||
}
|
||||
return _categoryView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
131
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertGiftView.xib
Executable file
131
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertGiftView.xib
Executable file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="YYMicAlertGiftView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="iOi-zt-Uy5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.50463680345184947" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PzA-fC-a6k">
|
||||
<rect key="frame" x="0.0" y="382" width="375" height="430"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="spi-fw-0TT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="430"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="礼物墙" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YsJ-0e-UF3">
|
||||
<rect key="frame" x="160" y="18.5" width="55.5" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="gOa-79-uWo">
|
||||
<rect key="frame" x="157.5" y="54" width="60" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="60" id="mIm-1S-DMC"/>
|
||||
<constraint firstAttribute="height" constant="60" id="woB-Ku-nml"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="30"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wkr-fE-aYh">
|
||||
<rect key="frame" x="172" y="121" width="31" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Thj-hP-xFj">
|
||||
<rect key="frame" x="0.0" y="55" width="375" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="g5F-Ma-jUg"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pro-bV-rEz">
|
||||
<rect key="frame" x="7" y="14" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="1iE-KY-Fxg"/>
|
||||
<constraint firstAttribute="height" constant="30" id="RR4-H2-8ic"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="whiteBack"/>
|
||||
<connections>
|
||||
<action selector="onDismiss:" destination="iN0-l3-epB" eventType="touchUpInside" id="DkB-Ao-PUt"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="8Dd-QD-LcT">
|
||||
<rect key="frame" x="0.0" y="109" width="375" height="321"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="dYE-4O-VWl">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" id="5DF-0X-SX5"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8Dd-QD-LcT" secondAttribute="trailing" id="6KK-jO-Q8O"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" constant="7" id="9Ui-UW-vzG"/>
|
||||
<constraint firstItem="gOa-79-uWo" firstAttribute="centerX" secondItem="PzA-fC-a6k" secondAttribute="centerX" id="F4Y-0y-19u"/>
|
||||
<constraint firstItem="gOa-79-uWo" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="54" id="Kop-5w-Aij"/>
|
||||
<constraint firstItem="8Dd-QD-LcT" firstAttribute="top" secondItem="Thj-hP-xFj" secondAttribute="bottom" constant="10" id="LsV-OY-2MW"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="14" id="N1M-y7-9Ln"/>
|
||||
<constraint firstItem="8Dd-QD-LcT" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="PCI-YS-JQA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8Dd-QD-LcT" secondAttribute="bottom" id="PbK-lw-ixQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Thj-hP-xFj" secondAttribute="trailing" id="PjK-Q8-yS2"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerY" secondItem="Pro-bV-rEz" secondAttribute="centerY" id="TIE-OD-etW"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="V4H-0g-x5k"/>
|
||||
<constraint firstItem="Thj-hP-xFj" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="adp-Jf-5wz"/>
|
||||
<constraint firstItem="Wkr-fE-aYh" firstAttribute="top" secondItem="gOa-79-uWo" secondAttribute="bottom" constant="7" id="cem-gS-jMe"/>
|
||||
<constraint firstItem="Wkr-fE-aYh" firstAttribute="centerX" secondItem="gOa-79-uWo" secondAttribute="centerX" id="dAd-81-6fE"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerX" secondItem="PzA-fC-a6k" secondAttribute="centerX" id="j9w-sf-Pxi"/>
|
||||
<constraint firstItem="Thj-hP-xFj" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="55" id="jVS-DP-DcJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="spi-fw-0TT" secondAttribute="bottom" id="jcq-og-Vfg"/>
|
||||
<constraint firstAttribute="height" constant="430" id="sdD-kW-q9q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="spi-fw-0TT" secondAttribute="trailing" id="uQV-rG-Aew"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="PzA-fC-a6k" secondAttribute="bottom" id="9Qz-br-nwq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PzA-fC-a6k" secondAttribute="trailing" id="CMa-9H-ZNA"/>
|
||||
<constraint firstItem="PzA-fC-a6k" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="QrX-RW-SNp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iOi-zt-Uy5" secondAttribute="trailing" id="auO-5z-Ce6"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="k2y-8M-4VZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="iOi-zt-Uy5" secondAttribute="bottom" id="mdX-U3-TGT"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="wI1-hD-BeC"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="avatarImgV" destination="gOa-79-uWo" id="GSE-QL-8gp"/>
|
||||
<outlet property="collectionView" destination="8Dd-QD-LcT" id="zgV-O0-o6X"/>
|
||||
<outlet property="nicknameLab" destination="Wkr-fE-aYh" id="Wfl-DD-Bcg"/>
|
||||
<outlet property="titleBgView" destination="Thj-hP-xFj" id="7zg-Zf-eXA"/>
|
||||
<outlet property="touchImgV" destination="iOi-zt-Uy5" id="9H4-Zl-aAc"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-147" y="80"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="common_alert_bg" width="375" height="358"/>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<image name="whiteBack" width="8.5" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
32
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouCell.h
Executable file
32
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouCell.h
Executable file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// YYMicAlertMiyouCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SPFocusFansModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef void(^miyouMoreButtonClickBlock)(void);
|
||||
@interface YYMicAlertMiyouCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *sexImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIView *tagView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *tagLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *coinImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *coinLab;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *moreButton;
|
||||
|
||||
@property (nonatomic, copy) miyouMoreButtonClickBlock moreBlock;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tagRight;
|
||||
|
||||
- (void)onUpdateUIWith:(SPFocusFansModel *)model type:(NSInteger)type;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
39
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouCell.m
Executable file
39
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouCell.m
Executable file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// YYMicAlertMiyouCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/26.
|
||||
//
|
||||
|
||||
#import "YYMicAlertMiyouCell.h"
|
||||
|
||||
@implementation YYMicAlertMiyouCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
[self.tagView styleGradiBlueColor];
|
||||
}
|
||||
|
||||
- (void)onUpdateUIWith:(SPFocusFansModel *)model type:(NSInteger)type {
|
||||
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab.text = model.nick_name;
|
||||
|
||||
self.tagLabel.text = model.name;
|
||||
self.timeLab.text = [NSString stringWithFormat:@"ID:%@", model.uid];
|
||||
self.sexImgV.image = model.sex == 1 ? ImageNamed(@"sex_nan") : ImageNamed(@"sex_nv");
|
||||
if (type == 1) {
|
||||
self.timeLab.text = [NSString stringWithFormat:@"剩余时间:%@天", model.surplus_time];
|
||||
self.tagView.backgroundColor = MHColorFromHexString(model.color);
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)moreButtonClick:(UIButton *)sender {
|
||||
if (self.moreBlock){
|
||||
self.moreBlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
148
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouCell.xib
Executable file
148
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouCell.xib
Executable file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YYMicAlertMiyouCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="72"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="72"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ens-0X-vKN">
|
||||
<rect key="frame" x="15" y="14" width="44" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="NVc-1n-Tcl"/>
|
||||
<constraint firstAttribute="width" constant="44" id="opv-TM-uKh"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7UJ-oU-ZRF">
|
||||
<rect key="frame" x="69" y="14" width="33" height="19.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sex_nv" translatesAutoresizingMaskIntoConstraints="NO" id="g89-eM-LcN">
|
||||
<rect key="frame" x="109" y="16" width="16" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="DAd-l2-coE"/>
|
||||
<constraint firstAttribute="width" constant="16" id="Mld-DN-BMw"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="剩余时间:7天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dnp-zB-kKF">
|
||||
<rect key="frame" x="69" y="40.5" width="80.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dress_coin" translatesAutoresizingMaskIntoConstraints="NO" id="OCb-bp-LC1">
|
||||
<rect key="frame" x="159.5" y="36" width="24" height="24"/>
|
||||
</imageView>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J37-hS-NTX">
|
||||
<rect key="frame" x="186.5" y="41.5" width="21.5" height="13"/>
|
||||
<fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JHQ-Wc-Vua">
|
||||
<rect key="frame" x="15" y="71.5" width="345" height="0.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.099188772188562924" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="LCv-Yo-DOe"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CLJ-hj-DRk">
|
||||
<rect key="frame" x="273" y="24" width="48" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2U7-Ia-0Zg">
|
||||
<rect key="frame" x="10" y="0.0" width="28" height="24"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="2U7-Ia-0Zg" firstAttribute="leading" secondItem="CLJ-hj-DRk" secondAttribute="leading" constant="10" id="8nr-DR-Mcr"/>
|
||||
<constraint firstItem="2U7-Ia-0Zg" firstAttribute="top" secondItem="CLJ-hj-DRk" secondAttribute="top" id="RfJ-pe-1jD"/>
|
||||
<constraint firstAttribute="height" constant="24" id="dE0-4e-Xpu"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="48" id="fLP-kZ-a0g"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2U7-Ia-0Zg" secondAttribute="trailing" constant="10" id="fW9-B2-Cyn"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2U7-Ia-0Zg" secondAttribute="bottom" id="iT7-50-INZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Myw-4U-agx">
|
||||
<rect key="frame" x="336" y="24" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="Vzf-Lx-3MF"/>
|
||||
<constraint firstAttribute="width" constant="24" id="vCy-E9-xs8"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="miyou_delete_more"/>
|
||||
<connections>
|
||||
<action selector="moreButtonClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="10E-df-NRG"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="OCb-bp-LC1" firstAttribute="centerY" secondItem="Dnp-zB-kKF" secondAttribute="centerY" id="0Dm-js-0hJ"/>
|
||||
<constraint firstItem="ens-0X-vKN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="4J4-iS-m2Y"/>
|
||||
<constraint firstItem="CLJ-hj-DRk" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="7s7-Od-LpE"/>
|
||||
<constraint firstItem="ens-0X-vKN" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Ag4-g5-e3b"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Myw-4U-agx" secondAttribute="trailing" constant="15" id="EtA-YM-ipn"/>
|
||||
<constraint firstAttribute="bottom" secondItem="JHQ-Wc-Vua" secondAttribute="bottom" id="GLw-Hq-tdA"/>
|
||||
<constraint firstItem="J37-hS-NTX" firstAttribute="leading" secondItem="OCb-bp-LC1" secondAttribute="trailing" constant="3" id="NJu-K9-DlM"/>
|
||||
<constraint firstItem="g89-eM-LcN" firstAttribute="centerY" secondItem="7UJ-oU-ZRF" secondAttribute="centerY" id="PDp-ET-cDU"/>
|
||||
<constraint firstItem="OCb-bp-LC1" firstAttribute="leading" secondItem="Dnp-zB-kKF" secondAttribute="trailing" constant="10" id="RJM-xv-oiC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="CLJ-hj-DRk" secondAttribute="trailing" constant="54" id="VcA-ck-kpM"/>
|
||||
<constraint firstItem="7UJ-oU-ZRF" firstAttribute="top" secondItem="ens-0X-vKN" secondAttribute="top" id="W1c-w2-OdX"/>
|
||||
<constraint firstItem="J37-hS-NTX" firstAttribute="centerY" secondItem="OCb-bp-LC1" secondAttribute="centerY" id="Z81-Hq-HOw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="JHQ-Wc-Vua" secondAttribute="trailing" constant="15" id="blD-bU-BbB"/>
|
||||
<constraint firstItem="Dnp-zB-kKF" firstAttribute="leading" secondItem="7UJ-oU-ZRF" secondAttribute="leading" id="ceM-XQ-erZ"/>
|
||||
<constraint firstItem="JHQ-Wc-Vua" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="d2R-aW-zZl"/>
|
||||
<constraint firstItem="7UJ-oU-ZRF" firstAttribute="leading" secondItem="ens-0X-vKN" secondAttribute="trailing" constant="10" id="deQ-zZ-g6r"/>
|
||||
<constraint firstItem="Myw-4U-agx" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="dso-di-INp"/>
|
||||
<constraint firstItem="g89-eM-LcN" firstAttribute="leading" secondItem="7UJ-oU-ZRF" secondAttribute="trailing" constant="7" id="rAv-87-sJc"/>
|
||||
<constraint firstItem="Dnp-zB-kKF" firstAttribute="top" secondItem="7UJ-oU-ZRF" secondAttribute="bottom" constant="7" id="uIV-77-XKV"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="avatarImgV" destination="ens-0X-vKN" id="jpf-JQ-NAN"/>
|
||||
<outlet property="coinImgV" destination="OCb-bp-LC1" id="9wu-Ng-H01"/>
|
||||
<outlet property="coinLab" destination="J37-hS-NTX" id="cRu-IN-swf"/>
|
||||
<outlet property="moreButton" destination="Myw-4U-agx" id="Rhv-df-zGQ"/>
|
||||
<outlet property="nicknameLab" destination="7UJ-oU-ZRF" id="n3n-RA-tVz"/>
|
||||
<outlet property="sexImgV" destination="g89-eM-LcN" id="KeZ-eX-T0S"/>
|
||||
<outlet property="tagLabel" destination="2U7-Ia-0Zg" id="Cyq-3n-XNY"/>
|
||||
<outlet property="tagRight" destination="VcA-ck-kpM" id="OH8-6U-mjI"/>
|
||||
<outlet property="tagView" destination="CLJ-hj-DRk" id="suN-Vc-A3q"/>
|
||||
<outlet property="timeLab" destination="Dnp-zB-kKF" id="E2G-27-M9T"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132.60869565217394" y="90.401785714285708"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<image name="dress_coin" width="24" height="24"/>
|
||||
<image name="miyou_delete_more" width="24" height="24"/>
|
||||
<image name="sex_nv" width="16" height="16"/>
|
||||
</resources>
|
||||
</document>
|
||||
22
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouView.h
Executable file
22
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouView.h
Executable file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// YYMicAlertMiyouView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYMicAlertMiyouView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
|
||||
- (void)onUpdateUIWith:(NSInteger)type uid:(NSString *)uid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
131
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouView.m
Executable file
131
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouView.m
Executable file
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// YYMicAlertMiyouView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import "YYMicAlertMiyouView.h"
|
||||
#import "YYMicAlertMiyouCell.h"
|
||||
#import "LMDeleteMiyouAlertView.h"
|
||||
|
||||
@interface YYMicAlertMiyouView () <UITableViewDataSource, UITableViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) NSArray *dataArray;
|
||||
|
||||
@property(nonatomic, assign) NSInteger type;//1密友 2签约
|
||||
@property(nonatomic, copy) NSString *uid;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYMicAlertMiyouView
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
- (void)onUpdateUIWith:(NSInteger)type uid:(NSString *)uid {
|
||||
_type = type;
|
||||
_uid = uid;
|
||||
|
||||
if (type == 1) {
|
||||
self.titleLab.text = @"密友";
|
||||
}else if (type == 2) {
|
||||
self.titleLab.text = @"签约艺人";
|
||||
}
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (void)fetchData {
|
||||
NSDictionary *params = @{};
|
||||
NSString *urlStr = @"";
|
||||
if (self.type == 1) {
|
||||
urlStr = @"/api/dating_room/get_user_relation_list";
|
||||
params = @{@"page":@(1), @"page_limit":@(1000), @"user_id":C_string(self.uid)};
|
||||
}else if (self.type == 2) {
|
||||
urlStr = @"/api/Contract/get_user_contract_list";
|
||||
params = @{@"page":@(1), @"page_limit":@(1000), @"uid":C_string(self.uid)};
|
||||
}
|
||||
[AFNetworkRequset.shared postRequestWithParams:params Path:urlStr Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
|
||||
NSArray *arr = [SPFocusFansModel mj_objectArrayWithKeyValuesArray:responseDic[@"data"]];
|
||||
if (self.type == 1) {
|
||||
arr = [SPFocusFansModel mj_objectArrayWithKeyValuesArray:responseDic[@"data"][@"list"]];
|
||||
self.titleLab.text = [NSString stringWithFormat:@"密友(%@)", responseDic[@"data"][@"count"]];
|
||||
}
|
||||
self.dataArray = arr;
|
||||
[self.tableView reloadData];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
self.tableView.separatorStyle = NO;
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
[self.tableView registerNib:[UINib nibWithNibName:@"YYMicAlertMiyouCell" bundle:nil] forCellReuseIdentifier:@"YYMicAlertMiyouCell"];
|
||||
self.tableView.rowHeight = 72;
|
||||
}
|
||||
|
||||
- (IBAction)onDismiss:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
YYMicAlertMiyouCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YYMicAlertMiyouCell" forIndexPath:indexPath];
|
||||
cell.selectionStyle = NO;
|
||||
if (self.type == 2) {
|
||||
cell.tagView.hidden = cell.coinImgV.hidden = cell.coinLab.hidden = YES;
|
||||
}
|
||||
SPFocusFansModel *model = self.dataArray[indexPath.row];
|
||||
[cell onUpdateUIWith:model type:self.type];
|
||||
if (![_uid isEqualToString:[BJUserManager userInfo].uid]){
|
||||
cell.moreButton.hidden = YES;
|
||||
cell.tagRight.constant = 15;
|
||||
}
|
||||
|
||||
WEAK_SELF;
|
||||
cell.moreBlock = ^{
|
||||
[weakSelf showDeleteViewWithFID:model.id];
|
||||
};
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
SPFocusFansModel *model = self.dataArray[indexPath.row];
|
||||
[UIViewController goUserMainpageWith:model.uid withRid:@""];
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)showDeleteViewWithFID:(NSString *)fid
|
||||
{
|
||||
LMDeleteMiyouAlertView *deletev = LoadNib(@"LMDeleteMiyouAlertView");
|
||||
deletev.frame = CGRectMake(0, 0, APPW, APPH);
|
||||
[MainWindow() addSubview:deletev];
|
||||
deletev.fid = fid;
|
||||
[deletev sheetViewforViewAppear];
|
||||
WEAK_SELF;
|
||||
deletev.sucBlock = ^{
|
||||
[weakSelf fetchData];
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
90
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouView.xib
Executable file
90
SweetParty/主类/音悦新增/麦位弹框子列表/YYMicAlertMiyouView.xib
Executable file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="YYMicAlertMiyouView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="iOi-zt-Uy5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PzA-fC-a6k">
|
||||
<rect key="frame" x="0.0" y="329" width="375" height="483"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="spi-fw-0TT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="483"/>
|
||||
</imageView>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="HLR-ha-zFy">
|
||||
<rect key="frame" x="0.0" y="55" width="375" height="428"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pro-bV-rEz">
|
||||
<rect key="frame" x="7" y="14" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="1iE-KY-Fxg"/>
|
||||
<constraint firstAttribute="height" constant="30" id="RR4-H2-8ic"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="whiteBack"/>
|
||||
<connections>
|
||||
<action selector="onDismiss:" destination="iN0-l3-epB" eventType="touchUpInside" id="esP-XN-u1c"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="密友(6)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YsJ-0e-UF3">
|
||||
<rect key="frame" x="156" y="18.5" width="63.5" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="HLR-ha-zFy" secondAttribute="bottom" id="428-WV-AXp"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" id="5DF-0X-SX5"/>
|
||||
<constraint firstItem="HLR-ha-zFy" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="55" id="5k2-f5-x62"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" constant="7" id="9Ui-UW-vzG"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="14" id="N1M-y7-9Ln"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerY" secondItem="Pro-bV-rEz" secondAttribute="centerY" id="TIE-OD-etW"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="V4H-0g-x5k"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HLR-ha-zFy" secondAttribute="trailing" id="WXx-Yx-Oq7"/>
|
||||
<constraint firstItem="HLR-ha-zFy" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="iuI-zX-IDy"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerX" secondItem="PzA-fC-a6k" secondAttribute="centerX" id="j9w-sf-Pxi"/>
|
||||
<constraint firstAttribute="bottom" secondItem="spi-fw-0TT" secondAttribute="bottom" id="jcq-og-Vfg"/>
|
||||
<constraint firstAttribute="height" constant="483" id="sdD-kW-q9q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="spi-fw-0TT" secondAttribute="trailing" id="uQV-rG-Aew"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="PzA-fC-a6k" secondAttribute="bottom" id="9Qz-br-nwq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PzA-fC-a6k" secondAttribute="trailing" id="CMa-9H-ZNA"/>
|
||||
<constraint firstItem="PzA-fC-a6k" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="QrX-RW-SNp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iOi-zt-Uy5" secondAttribute="trailing" id="auO-5z-Ce6"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="k2y-8M-4VZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="iOi-zt-Uy5" secondAttribute="bottom" id="mdX-U3-TGT"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="wI1-hD-BeC"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="HLR-ha-zFy" id="8h1-dS-jyE"/>
|
||||
<outlet property="titleLab" destination="YsJ-0e-UF3" id="JMh-cT-buS"/>
|
||||
<outlet property="touchImgV" destination="iOi-zt-Uy5" id="9H4-Zl-aAc"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="131" y="-86"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="common_alert_bg" width="375" height="358"/>
|
||||
<image name="whiteBack" width="8.5" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
25
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostCell.h
Executable file
25
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostCell.h
Executable file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// YYSetHostCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2022/6/8.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SPFocusFansModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYSetHostCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *focusBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *IDLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *sexImgV;
|
||||
|
||||
@property (nonatomic, strong) SPFocusFansModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
30
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostCell.m
Executable file
30
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostCell.m
Executable file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// YYSetHostCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2022/6/8.
|
||||
//
|
||||
|
||||
#import "YYSetHostCell.h"
|
||||
|
||||
@interface YYSetHostCell ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYSetHostCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(SPFocusFansModel *)model {
|
||||
_model = model;
|
||||
|
||||
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab.text = model.nick_name;
|
||||
self.IDLab.text = [NSString stringWithFormat:@"%@", model.uid];
|
||||
self.sexImgV.image = model.sex == 1 ? ImageNamed(@"sex_nan") : ImageNamed(@"sex_nv");
|
||||
}
|
||||
|
||||
@end
|
||||
127
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostCell.xib
Executable file
127
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostCell.xib
Executable file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YYSetHostCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CDP-kI-GqL">
|
||||
<rect key="frame" x="15" y="18" width="44" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="DJv-tU-Rsw"/>
|
||||
<constraint firstAttribute="width" constant="44" id="UQG-qd-Res"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</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="ela-Ca-3UK">
|
||||
<rect key="frame" x="69" y="18" width="40" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9ul-xV-SIv">
|
||||
<rect key="frame" x="300" y="26" width="68" height="28"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="Bcv-JN-Dve"/>
|
||||
<constraint firstAttribute="width" constant="68" id="Hwa-90-gU8"/>
|
||||
</constraints>
|
||||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<state key="normal" image="room_alert_host_set">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wml-Su-fBa">
|
||||
<rect key="frame" x="15" y="79.5" width="360" height="0.5"/>
|
||||
<color key="backgroundColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="0.10353015718005952" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="krd-ge-0wl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bfr-6N-REP">
|
||||
<rect key="frame" x="69" y="39" width="67.5" height="20"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="party_ID" translatesAutoresizingMaskIntoConstraints="NO" id="wEv-i6-gV3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="Rc6-a8-0AI"/>
|
||||
<constraint firstAttribute="height" constant="20" id="bwX-m8-KXC"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VVH-bk-QTi">
|
||||
<rect key="frame" x="23" y="4" width="39.5" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="24V-N1-XXR"/>
|
||||
<constraint firstItem="VVH-bk-QTi" firstAttribute="leading" secondItem="Bfr-6N-REP" secondAttribute="leading" constant="23" id="D9V-7s-nBS"/>
|
||||
<constraint firstItem="wEv-i6-gV3" firstAttribute="leading" secondItem="Bfr-6N-REP" secondAttribute="leading" id="WrL-fI-6iI"/>
|
||||
<constraint firstItem="wEv-i6-gV3" firstAttribute="centerY" secondItem="Bfr-6N-REP" secondAttribute="centerY" id="Xep-Ns-Hej"/>
|
||||
<constraint firstItem="VVH-bk-QTi" firstAttribute="centerY" secondItem="Bfr-6N-REP" secondAttribute="centerY" id="aOU-th-fMc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="VVH-bk-QTi" secondAttribute="trailing" constant="5" id="kyM-VZ-DLe"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="bdl-hI-YsG">
|
||||
<rect key="frame" x="112" y="19.5" width="15" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="15" id="744-Mi-YJf"/>
|
||||
<constraint firstAttribute="height" constant="15" id="yhr-VP-ffb"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="CDP-kI-GqL" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="1y5-Q0-eyP"/>
|
||||
<constraint firstItem="bdl-hI-YsG" firstAttribute="centerY" secondItem="ela-Ca-3UK" secondAttribute="centerY" id="5fd-4O-ZVP"/>
|
||||
<constraint firstItem="CDP-kI-GqL" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="9hO-cp-019"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9ul-xV-SIv" secondAttribute="trailing" constant="7" id="Bm0-kB-g4K"/>
|
||||
<constraint firstItem="9ul-xV-SIv" firstAttribute="centerY" secondItem="CDP-kI-GqL" secondAttribute="centerY" id="Jyk-dW-Vom"/>
|
||||
<constraint firstItem="Bfr-6N-REP" firstAttribute="leading" secondItem="ela-Ca-3UK" secondAttribute="leading" id="Lx9-CJ-2XC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wml-Su-fBa" secondAttribute="trailing" id="eOy-ex-vs7"/>
|
||||
<constraint firstItem="wml-Su-fBa" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="flY-t3-0n9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wml-Su-fBa" secondAttribute="bottom" id="h92-on-UZO"/>
|
||||
<constraint firstItem="bdl-hI-YsG" firstAttribute="leading" secondItem="ela-Ca-3UK" secondAttribute="trailing" constant="3" id="idZ-b8-eNR"/>
|
||||
<constraint firstItem="Bfr-6N-REP" firstAttribute="top" secondItem="ela-Ca-3UK" secondAttribute="bottom" constant="3" id="m3D-2m-vAb"/>
|
||||
<constraint firstItem="ela-Ca-3UK" firstAttribute="top" secondItem="CDP-kI-GqL" secondAttribute="top" id="oos-6B-lbD"/>
|
||||
<constraint firstItem="ela-Ca-3UK" firstAttribute="leading" secondItem="CDP-kI-GqL" secondAttribute="trailing" constant="10" id="yzM-1S-Mr7"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="IDLab" destination="VVH-bk-QTi" id="lFx-BI-sO5"/>
|
||||
<outlet property="avatarImgV" destination="CDP-kI-GqL" id="8wL-vF-E9W"/>
|
||||
<outlet property="focusBtn" destination="9ul-xV-SIv" id="OGy-el-yE3"/>
|
||||
<outlet property="nicknameLab" destination="ela-Ca-3UK" id="Dkc-XF-m0S"/>
|
||||
<outlet property="sexImgV" destination="bdl-hI-YsG" id="VJ1-Hc-Gkw"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="131.15942028985509" y="125.89285714285714"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="party_ID" width="20" height="20"/>
|
||||
<image name="room_alert_host_set" width="68" height="28"/>
|
||||
</resources>
|
||||
</document>
|
||||
23
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostView.h
Executable file
23
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostView.h
Executable file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// YYSetHostView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYSetHostView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *viewModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
145
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostView.m
Executable file
145
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostView.m
Executable file
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// YYSetHostView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/12/25.
|
||||
//
|
||||
|
||||
#import "YYSetHostView.h"
|
||||
#import "YYSetHostCell.h"
|
||||
|
||||
@interface YYSetHostView () <UITableViewDataSource, UITableViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) NSArray *hostArray;
|
||||
@property (nonatomic, strong) NSArray *onlineArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYSetHostView
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
self.tableView.separatorStyle = NO;
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
[self.tableView registerNib:[UINib nibWithNibName:@"YYSetHostCell" bundle:nil] forCellReuseIdentifier:@"YYSetHostCell"];
|
||||
self.tableView.rowHeight = 72;
|
||||
}
|
||||
|
||||
- (void)setViewModel:(RCMicRoomViewModel *)viewModel {
|
||||
_viewModel = viewModel;
|
||||
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (void)fetchData {
|
||||
NSDictionary *params = @{@"rid":C_string(self.viewModel.roomInfo.roomId)};
|
||||
[AFNetworkRequset.shared postRequestWithParams:params Path:@"/api/room/get_room_host_list" Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
|
||||
NSDictionary *dataDict = responseDic[@"data"];
|
||||
self.hostArray = [SPFocusFansModel mj_objectArrayWithKeyValuesArray:dataDict[@"room_host_list"]];
|
||||
self.onlineArray = [SPFocusFansModel mj_objectArrayWithKeyValuesArray:dataDict[@"room_visitor_list"]];
|
||||
[self.tableView reloadData];
|
||||
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)onDismiss:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
return self.hostArray.count;
|
||||
}else {
|
||||
return self.onlineArray.count;
|
||||
}
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
YYSetHostCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YYSetHostCell" forIndexPath:indexPath];
|
||||
cell.selectionStyle = NO;
|
||||
|
||||
WEAK_SELF
|
||||
if (indexPath.section == 0) {
|
||||
SPFocusFansModel *model = self.hostArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
// [cell.focusBtn setTitle:@"取消主持" forState:UIControlStateNormal];
|
||||
// [cell.focusBtn setTitleColor:HEXCOLOR(0x999999) forState:UIControlStateNormal];
|
||||
// cell.focusBtn.backgroundColor = HEXCOLORA(0xFFFFFF, 0.2);
|
||||
[cell.focusBtn setImage:ImageNamed(@"room_alert_host_cancel") forState:(UIControlStateNormal)];
|
||||
[cell.focusBtn buttonAddTaget:^(UIButton *btn) {
|
||||
[weakSelf onHost:model isSet:NO];
|
||||
} forControlEvents:UIControlEventTouchUpInside];
|
||||
}else {
|
||||
SPFocusFansModel *model = self.onlineArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
// [cell.focusBtn setTitle:@"添加主持" forState:UIControlStateNormal];
|
||||
// [cell.focusBtn setTitleColor:HEXCOLOR(0xFFFFFF) forState:UIControlStateNormal];
|
||||
// [cell.focusBtn styleGradiBlueColor];
|
||||
[cell.focusBtn setImage:ImageNamed(@"room_alert_host_set") forState:(UIControlStateNormal)];
|
||||
[cell.focusBtn buttonAddTaget:^(UIButton *btn) {
|
||||
[weakSelf onHost:model isSet:YES];
|
||||
} forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)onHost:(SPFocusFansModel *)model isSet:(BOOL)isSet {
|
||||
NSDictionary *params = @{@"rid":C_string(self.viewModel.roomInfo.roomId), @"uid":model.uid};
|
||||
NSString *urlStr = isSet ? @"/api/room/set_room_host" : @"/api/room/unset_room_host";
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:urlStr Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
||||
[self fetchData];
|
||||
//设置主持人消息
|
||||
[self.viewModel bj_sendHostChangeMessageTo:model.uid isAdmin:isSet];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
UIView *headerView = [ControlCreator createView:nil rect:CGRectMake(0, 0, ScreenViewWidth, 40) backguoundColor:nil];
|
||||
UILabel *headerLB = [ControlCreator createLabel:headerView rect:CGRectMake(15, 10, ScreenViewWidth, 20) text:@"" font:YBMediumFont(14) color:kWhiteColor backguoundColor:[UIColor clearColor] align:NSTextAlignmentLeft lines:1];
|
||||
if (section == 0) {
|
||||
headerLB.text = @"已有主持";
|
||||
}else {
|
||||
headerLB.text = @"添加主持";
|
||||
}
|
||||
|
||||
return headerView;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
return 40;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0.00001;
|
||||
}
|
||||
|
||||
@end
|
||||
90
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostView.xib
Executable file
90
SweetParty/主类/音悦新增/麦位弹框子列表/YYSetHostView.xib
Executable file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="YYSetHostView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="iOi-zt-Uy5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PzA-fC-a6k">
|
||||
<rect key="frame" x="0.0" y="424" width="375" height="388"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="spi-fw-0TT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="388"/>
|
||||
</imageView>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="HLR-ha-zFy">
|
||||
<rect key="frame" x="0.0" y="50" width="375" height="338"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pro-bV-rEz">
|
||||
<rect key="frame" x="7" y="14" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="1iE-KY-Fxg"/>
|
||||
<constraint firstAttribute="height" constant="30" id="RR4-H2-8ic"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="whiteBack"/>
|
||||
<connections>
|
||||
<action selector="onDismiss:" destination="iN0-l3-epB" eventType="touchUpInside" id="esP-XN-u1c"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设置主持" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YsJ-0e-UF3">
|
||||
<rect key="frame" x="153" y="18.5" width="69.5" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="HLR-ha-zFy" secondAttribute="bottom" id="428-WV-AXp"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" id="5DF-0X-SX5"/>
|
||||
<constraint firstItem="HLR-ha-zFy" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="50" id="5k2-f5-x62"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" constant="7" id="9Ui-UW-vzG"/>
|
||||
<constraint firstItem="Pro-bV-rEz" firstAttribute="top" secondItem="PzA-fC-a6k" secondAttribute="top" constant="14" id="N1M-y7-9Ln"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerY" secondItem="Pro-bV-rEz" secondAttribute="centerY" id="TIE-OD-etW"/>
|
||||
<constraint firstItem="spi-fw-0TT" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="V4H-0g-x5k"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HLR-ha-zFy" secondAttribute="trailing" id="WXx-Yx-Oq7"/>
|
||||
<constraint firstItem="HLR-ha-zFy" firstAttribute="leading" secondItem="PzA-fC-a6k" secondAttribute="leading" id="iuI-zX-IDy"/>
|
||||
<constraint firstItem="YsJ-0e-UF3" firstAttribute="centerX" secondItem="PzA-fC-a6k" secondAttribute="centerX" id="j9w-sf-Pxi"/>
|
||||
<constraint firstAttribute="bottom" secondItem="spi-fw-0TT" secondAttribute="bottom" id="jcq-og-Vfg"/>
|
||||
<constraint firstAttribute="height" constant="388" id="sdD-kW-q9q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="spi-fw-0TT" secondAttribute="trailing" id="uQV-rG-Aew"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="PzA-fC-a6k" secondAttribute="bottom" id="9Qz-br-nwq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PzA-fC-a6k" secondAttribute="trailing" id="CMa-9H-ZNA"/>
|
||||
<constraint firstItem="PzA-fC-a6k" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="QrX-RW-SNp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iOi-zt-Uy5" secondAttribute="trailing" id="auO-5z-Ce6"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="k2y-8M-4VZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="iOi-zt-Uy5" secondAttribute="bottom" id="mdX-U3-TGT"/>
|
||||
<constraint firstItem="iOi-zt-Uy5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="wI1-hD-BeC"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="HLR-ha-zFy" id="8h1-dS-jyE"/>
|
||||
<outlet property="titleLab" destination="YsJ-0e-UF3" id="JMh-cT-buS"/>
|
||||
<outlet property="touchImgV" destination="iOi-zt-Uy5" id="9H4-Zl-aAc"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="118" y="-57"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="common_alert_bg" width="375" height="358"/>
|
||||
<image name="whiteBack" width="8.5" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
Reference in New Issue
Block a user