Commit a0440a61 by ludi

备份一下,完成我的头部修改,搜索润色

parent ac847042
//
// FUSLoadingIndicator.swift
// LudyUITestDemo
//
// Created by aaa on 2023/11/15.
//
import UIKit
@objcMembers public class FUSLoadingIndicator: UIView {
static let shared = FUSLoadingIndicator()
private let containerView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(white: 0, alpha: 0)
return view
}()
private var isAnimating = false
private let animationImageView: UIImageView = {
let imageView = UIImageView()
imageView.contentMode = .scaleAspectFit
return imageView
}()
private override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
private func commonInit() {
addSubview(containerView)
containerView.addSubview(animationImageView)
setupConstraints()
setupAnimation()
}
private func setupConstraints() {
containerView.translatesAutoresizingMaskIntoConstraints = false
animationImageView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
containerView.centerXAnchor.constraint(equalTo: centerXAnchor),
containerView.centerYAnchor.constraint(equalTo: centerYAnchor),
containerView.widthAnchor.constraint(equalToConstant: 50),
containerView.heightAnchor.constraint(equalToConstant: 50),
animationImageView.centerXAnchor.constraint(equalTo: containerView.centerXAnchor),
animationImageView.centerYAnchor.constraint(equalTo: containerView.centerYAnchor),
// animationImageView.widthAnchor.constraint(equalToConstant: 50),
// animationImageView.heightAnchor.constraint(equalToConstant: 50)
])
}
private func setupAnimation() {
var images: [UIImage] = []
for i in 1...39 {
if let image = UIImage(named: "FFLoadingIndicator_v1_\(String(format: "%02d", i))") {
images.append(image)
}
}
animationImageView.animationImages = images
animationImageView.animationDuration = 1.2
animationImageView.animationRepeatCount = 0 // 0 means repeat indefinitely
}
static public func fus_show(canTouch: Bool) {
if shared.isAnimating { return }
DispatchQueue.main.async {
guard let keyWindow = FUSLoadingIndicator.fus_findKeyWindow() else { return }
shared.isAnimating = true
shared.frame = keyWindow.bounds
shared.isUserInteractionEnabled = !canTouch
keyWindow.addSubview(shared)
shared.animationImageView.startAnimating()
}
}
static func fus_findKeyWindow() -> UIWindow? {
if #available(iOS 13.0, *) {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
return windowScene.windows.first(where: { $0.isKeyWindow })
}else {
return nil
}
}else {
return UIApplication.shared.keyWindow
}
}
static public func fus_dismiss() {
DispatchQueue.main.async {
shared.isAnimating = false
shared.animationImageView.stopAnimating()
shared.removeFromSuperview()
}
}
}
...@@ -13,5 +13,6 @@ ...@@ -13,5 +13,6 @@
+ (UIFont *)fus_themeFont:(CGFloat)fontSize; + (UIFont *)fus_themeFont:(CGFloat)fontSize;
+ (UIFont *)fus_themeMediumFont:(CGFloat)fontSize; + (UIFont *)fus_themeMediumFont:(CGFloat)fontSize;
+ (UIFont *)fus_themeBoldFont:(CGFloat)fontSize; + (UIFont *)fus_themeBoldFont:(CGFloat)fontSize;
+(UIFont *)fus_custom1ItalicFont:(CGFloat)fontSize;
@end @end
...@@ -26,4 +26,14 @@ ...@@ -26,4 +26,14 @@
return font ?: [UIFont systemFontOfSize:fontSize]; return font ?: [UIFont systemFontOfSize:fontSize];
} }
+(UIFont *)fus_custom1ItalicFont:(CGFloat)fontSize {
UIFont *font = [UIFont fontWithName:@"Geometric706BT-BlackCondensedB" size:fontSize];
if (font) {
return font;
}else{
return [UIFont systemFontOfSize:fontSize];;
}
return font ?: [UIFont systemFontOfSize:fontSize];
}
@end @end
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
008FEC472C296CBC00B1AF13 /* FZCustom01.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 008FEC462C296CB700B1AF13 /* FZCustom01.ttf */; };
00A0C5602C2676010044A41D /* FUSLoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 00A0C5542C2675FE0044A41D /* FUSLoginViewController.xib */; }; 00A0C5602C2676010044A41D /* FUSLoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 00A0C5542C2675FE0044A41D /* FUSLoginViewController.xib */; };
00A0C5612C2676010044A41D /* FUSForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A0C5552C2675FE0044A41D /* FUSForgetPasswordViewController.m */; }; 00A0C5612C2676010044A41D /* FUSForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A0C5552C2675FE0044A41D /* FUSForgetPasswordViewController.m */; };
00A0C5622C2676010044A41D /* FUSMessageRegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A0C5572C2675FF0044A41D /* FUSMessageRegisterViewController.m */; }; 00A0C5622C2676010044A41D /* FUSMessageRegisterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A0C5572C2675FF0044A41D /* FUSMessageRegisterViewController.m */; };
...@@ -1398,6 +1399,7 @@ ...@@ -1398,6 +1399,7 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
008FEC462C296CB700B1AF13 /* FZCustom01.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = FZCustom01.ttf; sourceTree = "<group>"; };
00A0C5542C2675FE0044A41D /* FUSLoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FUSLoginViewController.xib; sourceTree = "<group>"; }; 00A0C5542C2675FE0044A41D /* FUSLoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FUSLoginViewController.xib; sourceTree = "<group>"; };
00A0C5552C2675FE0044A41D /* FUSForgetPasswordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSForgetPasswordViewController.m; sourceTree = "<group>"; }; 00A0C5552C2675FE0044A41D /* FUSForgetPasswordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSForgetPasswordViewController.m; sourceTree = "<group>"; };
00A0C5562C2675FE0044A41D /* FUSForgetPasswordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSForgetPasswordViewController.h; sourceTree = "<group>"; }; 00A0C5562C2675FE0044A41D /* FUSForgetPasswordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSForgetPasswordViewController.h; sourceTree = "<group>"; };
...@@ -8385,6 +8387,7 @@ ...@@ -8385,6 +8387,7 @@
BEDC65D32C09DAE700505F76 /* Font */ = { BEDC65D32C09DAE700505F76 /* Font */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
008FEC462C296CB700B1AF13 /* FZCustom01.ttf */,
BEDC65D22C09DAE700505F76 /* FZLanTingHei-B-GBK.ttf */, BEDC65D22C09DAE700505F76 /* FZLanTingHei-B-GBK.ttf */,
); );
path = Font; path = Font;
...@@ -8798,6 +8801,7 @@ ...@@ -8798,6 +8801,7 @@
BEDC6ECB2C09DAE800505F76 /* img_2.png in Resources */, BEDC6ECB2C09DAE800505F76 /* img_2.png in Resources */,
BED0FBBE2C0C49CA0017B285 /* FUSSelectImageCollectionViewCell.xib in Resources */, BED0FBBE2C0C49CA0017B285 /* FUSSelectImageCollectionViewCell.xib in Resources */,
BEDC6F292C09DAE900505F76 /* live_head_follow_btn_anim_0@2x.png in Resources */, BEDC6F292C09DAE900505F76 /* live_head_follow_btn_anim_0@2x.png in Resources */,
008FEC472C296CBC00B1AF13 /* FZCustom01.ttf in Resources */,
BEDC6F3F2C09DAE900505F76 /* 4_live_first_recharge_package_detail_placeholder.png in Resources */, BEDC6F3F2C09DAE900505F76 /* 4_live_first_recharge_package_detail_placeholder.png in Resources */,
BEDC6EE12C09DAE800505F76 /* dew_sky_award.json in Resources */, BEDC6EE12C09DAE800505F76 /* dew_sky_award.json in Resources */,
BED0F9A02C0C49C90017B285 /* FUSVideoChatSetItem.xib in Resources */, BED0F9A02C0C49C90017B285 /* FUSVideoChatSetItem.xib in Resources */,
......
...@@ -703,6 +703,20 @@ static dispatch_queue_t get_status_queue() { ...@@ -703,6 +703,20 @@ static dispatch_queue_t get_status_queue() {
// [Bugly startWithAppId:@"9356424af8" config:config]; // [Bugly startWithAppId:@"9356424af8" config:config];
} }
- (void)registerFont:(NSString *)fontName {
NSURL *fontURL = [[NSBundle mainBundle] URLForResource:fontName withExtension:@"ttf"];
NSData *fontData = [NSData dataWithContentsOfURL:fontURL];
CGDataProviderRef provider = CGDataProviderCreateWithCFData((__bridge CFDataRef)fontData);
CGFontRef font = CGFontCreateWithDataProvider(provider);
CFErrorRef error = NULL;
CTFontManagerRegisterGraphicsFont(font, &error);
if (error) {
CFRelease(error);
}
CFRelease(font);
CFRelease(provider);
}
- (NSString *)modeString - (NSString *)modeString
{ {
#if DEBUG #if DEBUG
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
@property (nonatomic, strong) UIButton *avatorBtn; @property (nonatomic, strong) UIButton *avatorBtn;
@property (nonatomic, strong) UILabel *nickNameLabel; @property (nonatomic, strong) UILabel *nickNameLabel;
//@property (nonatomic, strong) UILabel *vipMarkLabel;
@property (nonatomic, strong) UIImageView *vipMarkImgView; @property (nonatomic, strong) UIImageView *vipMarkImgView;
@property (nonatomic, strong) UILabel *levelLabel; @property (nonatomic, strong) UILabel *levelLabel;
@property (nonatomic, strong) UIButton *ageBtn; @property (nonatomic, strong) UIButton *ageBtn;
...@@ -86,72 +85,34 @@ ...@@ -86,72 +85,34 @@
make.left.top.bottom.equalTo(nickNameBgView); make.left.top.bottom.equalTo(nickNameBgView);
}]; }];
// self.vipMarkLabel = [[UILabel alloc] init];
// self.vipMarkLabel.font = [UIFont fus_themeBoldFont:9];
// self.vipMarkLabel.textColor = [UIColor fus_textColorRich];
// self.vipMarkLabel.text = @"V";
// self.vipMarkLabel.textAlignment = NSTextAlignmentCenter;
// self.vipMarkLabel.layer.cornerRadius = 14 / 2.0f;
// self.vipMarkLabel.layer.masksToBounds = YES;
// self.vipMarkLabel.backgroundColor = [UIColor fus_diamondBlue];
// [nickNameBgView addSubview:self.vipMarkLabel];
// [self.vipMarkLabel mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.equalTo(nickNameBgView);
// make.centerY.equalTo(nickNameBgView.mas_centerY);
// make.left.equalTo(self.nickNameLabel.mas_right).offset(6);
// make.size.mas_equalTo(CGSizeMake(14, 14));
// }];
self.vipMarkImgView = [[UIImageView alloc] init];
self.vipMarkImgView.contentMode = UIViewContentModeScaleAspectFit;
[nickNameBgView addSubview:self.vipMarkImgView];
[self.vipMarkImgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(nickNameBgView);
make.centerY.equalTo(nickNameBgView.mas_centerY);
make.left.equalTo(self.nickNameLabel.mas_right).offset(6);
// make.size.mas_equalTo(CGSizeMake(14, 14));
make.height.offset(16);
}];
UIButton *sexBlankBgView = [UIButton buttonWithType:UIButtonTypeCustom];
[topBgView addSubview:sexBlankBgView];
[sexBlankBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(nickNameBgView.mas_bottom).offset(4);
make.centerX.equalTo(topBgView);
make.height.offset(18);
}];
self.levelLabel = [[UILabel alloc] init]; self.levelLabel = [[UILabel alloc] init];
self.levelLabel.font = [UIFont fus_themeFont:13]; self.levelLabel.font = [UIFont fus_themeFont:10];
self.levelLabel.textColor = [UIColor whiteColor]; self.levelLabel.textColor = [UIColor whiteColor];
self.levelLabel.backgroundColor = [UIColor colorWithHex:@"#87878A" alpha:0.32]; self.levelLabel.backgroundColor = [UIColor colorWithHex:@"#87878A" alpha:0.32];
self.levelLabel.layer.cornerRadius = 18 / 2.0f; self.levelLabel.layer.cornerRadius = 14 / 2.0f;
self.levelLabel.layer.masksToBounds = YES; self.levelLabel.layer.masksToBounds = YES;
[sexBlankBgView addSubview:self.levelLabel]; [nickNameBgView addSubview:self.levelLabel];
[self.levelLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.levelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.offset(0); make.height.offset(14);
make.left.equalTo(self.nickNameLabel.mas_right).offset(6);
make.centerY.equalTo(nickNameBgView.mas_centerY);
}]; }];
self.ageBtn = [UIButton buttonWithType:UIButtonTypeCustom]; self.vipMarkImgView = [[UIImageView alloc] init];
self.ageBtn.titleLabel.font = [UIFont fus_themeFont:12]; self.vipMarkImgView.contentMode = UIViewContentModeScaleAspectFit;
[self.ageBtn setTitleColor:[UIColor colorWithHex:@"#76C4FF"] forState:UIControlStateNormal]; [nickNameBgView addSubview:self.vipMarkImgView];
[self.ageBtn setTitleColor:[UIColor colorWithHex:@"#FE96B0"] forState:UIControlStateSelected]; [self.vipMarkImgView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.ageBtn setImage:[UIImage imageNamed:@"fus_common_sex_male_icon"] forState:UIControlStateNormal]; make.right.equalTo(nickNameBgView);
[self.ageBtn setImage:[UIImage imageNamed:@"fus_common_sex_female_icon"] forState:UIControlStateSelected]; make.centerY.equalTo(nickNameBgView.mas_centerY);
self.ageBtn.layer.cornerRadius = 18 / 2.0f;
self.ageBtn.layer.borderWidth = 1;
self.ageBtn.layer.borderColor = [UIColor colorWithHex:@"#87878A" alpha:0.32].CGColor;
[sexBlankBgView addSubview:self.ageBtn];
[self.ageBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.right.bottom.offset(0);
make.left.equalTo(self.levelLabel.mas_right).offset(6); make.left.equalTo(self.levelLabel.mas_right).offset(6);
make.width.offset(40); make.size.mas_equalTo(CGSizeMake(14, 14));
// make.height.offset(16);
}]; }];
UIButton *copyBgBtn = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *copyBgBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[topBgView addSubview:copyBgBtn]; [topBgView addSubview:copyBgBtn];
[copyBgBtn mas_makeConstraints:^(MASConstraintMaker *make) { [copyBgBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(sexBlankBgView.mas_bottom).offset(0); make.top.equalTo(nickNameBgView.mas_bottom).offset(0);
make.height.offset(34); make.height.offset(34);
make.centerX.equalTo(topBgView.mas_centerX); make.centerX.equalTo(topBgView.mas_centerX);
}]; }];
...@@ -165,14 +126,32 @@ ...@@ -165,14 +126,32 @@
make.centerY.equalTo(copyBgBtn.mas_centerY); make.centerY.equalTo(copyBgBtn.mas_centerY);
}]; }];
UIImageView *copyImgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fus_my_setting_header_copy_icon"]]; self.ageBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[copyBgBtn addSubview:copyImgView]; self.ageBtn.titleLabel.font = [UIFont fus_themeFont:12];
[copyImgView mas_makeConstraints:^(MASConstraintMaker *make) { [self.ageBtn setTitleColor:[UIColor colorWithHex:@"#76C4FF"] forState:UIControlStateNormal];
make.right.equalTo(copyBgBtn.mas_right).offset(-10); [self.ageBtn setTitleColor:[UIColor colorWithHex:@"#FE96B0"] forState:UIControlStateSelected];
make.centerY.equalTo(copyBgBtn.mas_centerY); [self.ageBtn setImage:[UIImage imageNamed:@"fus_common_sex_male_icon"] forState:UIControlStateNormal];
make.left.equalTo(self.idLabel.mas_right).offset(4); [self.ageBtn setImage:[UIImage imageNamed:@"fus_common_sex_female_icon"] forState:UIControlStateSelected];
self.ageBtn.layer.cornerRadius = 18 / 2.0f;
self.ageBtn.layer.borderWidth = 1;
self.ageBtn.layer.borderColor = [UIColor colorWithHex:@"#87878A" alpha:0.32].CGColor;
[copyBgBtn addSubview:self.ageBtn];
[self.ageBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.offset(0);
make.left.equalTo(self.idLabel.mas_right).offset(6);
make.width.offset(40);
make.height.offset(18);
make.centerY.equalTo(self.idLabel.mas_centerY);
}]; }];
// UIImageView *copyImgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fus_my_setting_header_copy_icon"]];
// [copyBgBtn addSubview:copyImgView];
// [copyImgView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.equalTo(copyBgBtn.mas_right).offset(-10);
// make.centerY.equalTo(copyBgBtn.mas_centerY);
// make.left.equalTo(self.idLabel.mas_right).offset(4);
// }];
UIImageView *topBottomBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fus_my_setting_header_contentBottom_bg"]]; UIImageView *topBottomBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fus_my_setting_header_contentBottom_bg"]];
topBottomBgImageView.userInteractionEnabled = YES; topBottomBgImageView.userInteractionEnabled = YES;
[topBgView addSubview:topBottomBgImageView]; [topBgView addSubview:topBottomBgImageView];
...@@ -193,7 +172,8 @@ ...@@ -193,7 +172,8 @@
[tempBgView addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside]; [tempBgView addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
UILabel *tempNumLabel = labelsArray[i]; UILabel *tempNumLabel = labelsArray[i];
tempNumLabel.font = [UIFont fus_themeBoldFont:25]; // tempNumLabel.font = [UIFont fus_themeBoldFont:25];
tempNumLabel.font = [UIFont fus_custom1ItalicFont:25];
tempNumLabel.textColor = [UIColor fus_textColorRich]; tempNumLabel.textColor = [UIColor fus_textColorRich];
[tempBgView addSubview:tempNumLabel]; [tempBgView addSubview:tempNumLabel];
[tempNumLabel mas_makeConstraints:^(MASConstraintMaker *make) { [tempNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -273,8 +253,6 @@ ...@@ -273,8 +253,6 @@
self.avatorBtn.tag = FUSMyHeaderButtonTypeMyZone; self.avatorBtn.tag = FUSMyHeaderButtonTypeMyZone;
[self.avatorBtn addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside]; [self.avatorBtn addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
sexBlankBgView.tag = FUSMyHeaderButtonTypeMyZone;
[sexBlankBgView addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
[copyBgBtn addTarget:self action:@selector(fus_copyBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside]; [copyBgBtn addTarget:self action:@selector(fus_copyBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
} }
...@@ -301,7 +279,7 @@ ...@@ -301,7 +279,7 @@
NSString *name = [NSString isNull:model.markName] ? model.nickname : model.markName; NSString *name = [NSString isNull:model.markName] ? model.nickname : model.markName;
self.nickNameLabel.text = name; self.nickNameLabel.text = name;
// id // id
self.idLabel.text = [NSString stringWithFormat:@"ID: %@",model.uid]; self.idLabel.text = [NSString stringWithFormat:@"Fusi ID: %@",model.uid];
// 关注 // 关注
NSString *focusNumberString = [NSString isNull:model.myfollow] ? @"0" : model.myfollow; NSString *focusNumberString = [NSString isNull:model.myfollow] ? @"0" : model.myfollow;
self.followNumLabel.text = focusNumberString; self.followNumLabel.text = focusNumberString;
...@@ -327,7 +305,7 @@ ...@@ -327,7 +305,7 @@
} }
// 等级 // 等级
NSString *levelString = [NSString isNull:model.lev] ? @"0" : model.lev; NSString *levelString = [NSString isNull:model.lev] ? @"0" : model.lev;
self.levelLabel.text = [NSString stringWithFormat:@" %@ ",levelString]; self.levelLabel.text = [NSString stringWithFormat:@" %@ ",levelString];
//baoshi //baoshi
self.dewNumLabel.text = [NSString isNull:model.chip] ? @"0" : model.chip; self.dewNumLabel.text = [NSString isNull:model.chip] ? @"0" : model.chip;
self.jewNumLabel.text = [NSString isNull:model.diamond] ? @"0" : model.diamond; self.jewNumLabel.text = [NSString isNull:model.diamond] ? @"0" : model.diamond;
...@@ -352,7 +330,7 @@ ...@@ -352,7 +330,7 @@
#pragma mark --- getter and setter #pragma mark --- getter and setter
+ (CGFloat)fus_viewHeight{ + (CGFloat)fus_viewHeight{
return 385 + UIView.fus_SafeTop; return 360 + UIView.fus_SafeTop;
} }
- (UILabel *)intimacyNumLabel{ - (UILabel *)intimacyNumLabel{
......
...@@ -45,7 +45,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -45,7 +45,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
@property (nonatomic, strong) NSMutableArray *allGroups; @property (nonatomic, strong) NSMutableArray *allGroups;
@property (nonatomic, strong) UIView *naviView; @property (nonatomic, strong) UIView *naviView;
@property (nonatomic, strong) UIButton *myzoneBtn; //@property (nonatomic, strong) UIButton *myzoneBtn;
@property (nonatomic, strong) UIButton *publishBtn; @property (nonatomic, strong) UIButton *publishBtn;
@property (nonatomic, strong) FUSMyHeaderView *headerView; @property (nonatomic, strong) FUSMyHeaderView *headerView;
...@@ -81,7 +81,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -81,7 +81,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
} }
- (void)fus_viewWillShow{ - (void)fus_viewWillShow{
[self fus_updateDataSourceWithType:ReadMemoryBegin]; [self fus_updateDataSourceWithType:ReadServerBegin];
} }
-(void)fus_createUI{ -(void)fus_createUI{
...@@ -105,23 +105,24 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -105,23 +105,24 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
self.naviView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_StatusBarHeight, UIView.fus_screenW, UIView.fus_NavgationBarHeight)]; self.naviView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_StatusBarHeight, UIView.fus_screenW, UIView.fus_NavgationBarHeight)];
[self addSubview:self.naviView]; [self addSubview:self.naviView];
self.myzoneBtn = [UIButton buttonWithType:UIButtonTypeCustom]; // self.myzoneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[self.myzoneBtn setImage:[UIImage imageNamed:@"fus_my_setting_navi_zone_icon"] forState:UIControlStateNormal]; // [self.myzoneBtn setImage:[UIImage imageNamed:@"fus_my_setting_navi_zone_icon"] forState:UIControlStateNormal];
[self.naviView addSubview:self.myzoneBtn]; // [self.naviView addSubview:self.myzoneBtn];
[self.myzoneBtn mas_makeConstraints:^(MASConstraintMaker *make) { // [self.myzoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.top.bottom.offset(0); // make.right.top.bottom.offset(0);
make.width.equalTo(self.myzoneBtn.mas_height); // make.width.equalTo(self.myzoneBtn.mas_height);
}]; // }];
[self.myzoneBtn.imageView mas_makeConstraints:^(MASConstraintMaker *make) { // [self.myzoneBtn.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_offset(CGSizeMake(18, 18)); // make.size.mas_offset(CGSizeMake(18, 18));
}]; // }];
self.publishBtn = [UIButton buttonWithType:UIButtonTypeCustom]; self.publishBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[self.publishBtn setImage:[UIImage imageNamed:@"fus_my_setting_navi_publish_icon"] forState:UIControlStateNormal]; [self.publishBtn setImage:[UIImage imageNamed:@"fus_my_setting_navi_publish_icon"] forState:UIControlStateNormal];
[self.naviView addSubview:self.publishBtn]; [self.naviView addSubview:self.publishBtn];
[self.publishBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.publishBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.bottom.offset(0); make.top.bottom.offset(0);
make.right.equalTo(self.myzoneBtn.mas_left); // make.right.equalTo(self.myzoneBtn.mas_left);
make.right.offset(0);
make.width.equalTo(self.publishBtn.mas_height); make.width.equalTo(self.publishBtn.mas_height);
}]; }];
...@@ -129,7 +130,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -129,7 +130,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
self.headerView.buttonDidClickedHander = ^(FUSMyHeaderButtonType type) { self.headerView.buttonDidClickedHander = ^(FUSMyHeaderButtonType type) {
[weakself fus_headerItemDidClicked:type]; [weakself fus_headerItemDidClicked:type];
}; };
[self.myzoneBtn addTarget:self action:@selector(myzoneBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside]; // [self.myzoneBtn addTarget:self action:@selector(myzoneBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.publishBtn addTarget:self action:@selector(publishBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside]; [self.publishBtn addTarget:self action:@selector(publishBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
} }
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
FUSLiveShareToChatModel *userModel = [[FUSLiveShareToChatModel alloc] init]; FUSLiveShareToChatModel *userModel = [[FUSLiveShareToChatModel alloc] init];
userModel.uid = model.uid; userModel.uid = model.uid;
userModel.face = model.faceimg; userModel.face = model.faceimg;
userModel.nickname = model.nickname; userModel.nickname = model.nickName;
userModel.level = model.level; userModel.level = model.level;
userModel.privilege = model.privilege; userModel.privilege = model.privilege;
userModel.selected = YES; userModel.selected = YES;
......
...@@ -769,7 +769,7 @@ WKScriptMessageHandler ...@@ -769,7 +769,7 @@ WKScriptMessageHandler
searchVC.fromType = FUSSearchFromAtSomeOne; searchVC.fromType = FUSSearchFromAtSomeOne;
searchVC.modalPresentationStyle = UIModalPresentationCustom; searchVC.modalPresentationStyle = UIModalPresentationCustom;
searchVC.didSelectedModelBlock = ^(FUSMainSearchModel *model) { searchVC.didSelectedModelBlock = ^(FUSMainSearchModel *model) {
[weakSelf.webView insertAtSomeOneName:model.nickname uid:model.uid index:_atSomeOneArr.count Callback:^(id _Nullable obj, NSError * _Nullable error) { [weakSelf.webView insertAtSomeOneName:model.nickName uid:model.uid index:_atSomeOneArr.count Callback:^(id _Nullable obj, NSError * _Nullable error) {
[weakSelf.webView contentBecomeFirstResponder]; [weakSelf.webView contentBecomeFirstResponder];
[self fus_checkInputContent]; [self fus_checkInputContent];
}]; }];
......
...@@ -20,6 +20,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab ...@@ -20,6 +20,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab
@objc var searchType = FUSSearchVcType.peopleNetwork @objc var searchType = FUSSearchVcType.peopleNetwork
@IBOutlet weak var searchInputBgView: UIView!
@IBOutlet weak var searchTextField: UITextField! @IBOutlet weak var searchTextField: UITextField!
@IBOutlet weak var cancelBtn: UIButton! @IBOutlet weak var cancelBtn: UIButton!
@IBOutlet weak var hotSearchLabel: UILabel! @IBOutlet weak var hotSearchLabel: UILabel!
...@@ -88,7 +89,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab ...@@ -88,7 +89,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self; tableView.dataSource = self;
tableView.register(UINib.init(nibName: "FUSSearchTableViewCell", bundle:nil), forCellReuseIdentifier: "cell") tableView.register(UINib.init(nibName: "FUSSearchTableViewCell", bundle:nil), forCellReuseIdentifier: "cell")
tableView.backgroundColor = UIColor(hex: "#11121A") tableView.backgroundColor = .fus_appBG()
tableView.separatorStyle = UITableViewCell.SeparatorStyle.none tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
tableView.isAllowFatherTouch = true tableView.isAllowFatherTouch = true
weak var weakSelf = self weak var weakSelf = self
...@@ -104,6 +105,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab ...@@ -104,6 +105,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab
refreshFooter.setTitle(FUSLocalizationHelper.localString("没有更多了"), for: MJRefreshState.noMoreData) refreshFooter.setTitle(FUSLocalizationHelper.localString("没有更多了"), for: MJRefreshState.noMoreData)
tableView.mj_footer = refreshFooter tableView.mj_footer = refreshFooter
self.searchInputBgView.backgroundColor = .fus_textInputBackgroundGray()
self.searchTextField.textAlignment = NSTextAlignment.left; self.searchTextField.textAlignment = NSTextAlignment.left;
var attrString:NSAttributedString{ var attrString:NSAttributedString{
...@@ -116,6 +118,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab ...@@ -116,6 +118,7 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab
hotSearchLabel.text = FUSLocalizationHelper.localString("观看记录") hotSearchLabel.text = FUSLocalizationHelper.localString("观看记录")
cancelBtn.setTitleColor(.fus_textColorRich(), for: .normal)
cancelBtn.setTitle(FUSLocalizationHelper.localString("取消"), for: UIControl.State.normal) cancelBtn.setTitle(FUSLocalizationHelper.localString("取消"), for: UIControl.State.normal)
cancelBtn.sizeToFit() cancelBtn.sizeToFit()
cancelConstraint.constant = cancelBtn.width + 10 cancelConstraint.constant = cancelBtn.width + 10
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<outlet property="cancelConstraint" destination="4Ib-o4-58q" id="l7J-br-aNW"/> <outlet property="cancelConstraint" destination="4Ib-o4-58q" id="l7J-br-aNW"/>
<outlet property="deleteBtn" destination="cVo-Tb-1ED" id="Uj7-M5-RIU"/> <outlet property="deleteBtn" destination="cVo-Tb-1ED" id="Uj7-M5-RIU"/>
<outlet property="hotSearchLabel" destination="Ygj-1H-BxV" id="a3L-n8-qQr"/> <outlet property="hotSearchLabel" destination="Ygj-1H-BxV" id="a3L-n8-qQr"/>
<outlet property="searchInputBgView" destination="TcZ-9Y-4WI" id="UAI-65-tIY"/>
<outlet property="searchTextField" destination="pRN-Ye-p5q" id="92Z-Pn-vS5"/> <outlet property="searchTextField" destination="pRN-Ye-p5q" id="92Z-Pn-vS5"/>
<outlet property="searchTextFieldBgView" destination="wAi-Gw-Z6k" id="oZ7-or-ZVV"/> <outlet property="searchTextFieldBgView" destination="wAi-Gw-Z6k" id="oZ7-or-ZVV"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@property (nonatomic, copy) NSString *level; @property (nonatomic, copy) NSString *level;
@property (nonatomic, copy) NSString *face; @property (nonatomic, copy) NSString *face;
@property (nonatomic, copy) NSString *lev; @property (nonatomic, copy) NSString *lev;
@property (nonatomic, copy) NSString *nickname; @property (nonatomic, copy) NSString *nickName;
@property (nonatomic, copy) NSString *markname; @property (nonatomic, copy) NSString *markname;
@property (nonatomic, copy) NSString *uid; @property (nonatomic, copy) NSString *uid;
@property (nonatomic, copy) NSDictionary *privilege; @property (nonatomic, copy) NSDictionary *privilege;
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
NSString *name = @""; NSString *name = @"";
if ([NSString isNull:model.markname]) { if ([NSString isNull:model.markname]) {
name = model.nickname; name = model.nickName;
} else { } else {
name = model.markname; name = model.markname;
} }
......
...@@ -38,6 +38,8 @@ class FUSSearchTableViewCell: UITableViewCell { ...@@ -38,6 +38,8 @@ class FUSSearchTableViewCell: UITableViewCell {
func commonInit(){ func commonInit(){
anchorName.textColor = .fus_textColorRich()
var callingImages = [UIImage]() var callingImages = [UIImage]()
var onLiveImages = [UIImage]() var onLiveImages = [UIImage]()
var onLineImages = [UIImage]() var onLineImages = [UIImage]()
...@@ -144,7 +146,7 @@ class FUSSearchTableViewCell: UITableViewCell { ...@@ -144,7 +146,7 @@ class FUSSearchTableViewCell: UITableViewCell {
} }
} }
anchorName.text = searchModel?.nickname anchorName.text = searchModel?.nickName
} }
} }
......
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
<string>获取图片,需要访问您的相册</string> <string>获取图片,需要访问您的相册</string>
<key>NSUserTrackingUsageDescription</key> <key>NSUserTrackingUsageDescription</key>
<string>此标识符将用于向您推荐个性化广告。</string> <string>此标识符将用于向您推荐个性化广告。</string>
<key>UIAppFonts</key>
<array>
<string>FZCustom01.ttf</string>
</array>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>audio</string> <string>audio</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment