苹果登录按钮替换成系统的登录按钮,移除发布声音秀修改声音

This commit is contained in:
linyudan
2023-12-20 11:20:49 -08:00
parent 153f297ea7
commit ba07ebf68d
23 changed files with 63 additions and 244 deletions

View File

@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic , copy) NSString * avatar;
/// mew avatar
//@property (nonatomic , copy) NSString * newAvatar;
@property (nonatomic , assign) GenderType gender;
@property (nonatomic , assign) MewGenderType gender;
@property (nonatomic , assign) NSInteger uid;
@property (nonatomic , assign) NSInteger platformRole;
@property (nonatomic , assign) BOOL isBindPasswd;

View File

@@ -7,26 +7,19 @@
#ifndef MewEnum_h
#define MewEnum_h
typedef NS_ENUM(NSUInteger, ThirdLoginType) {
ThirdLoginType_WeChat = 1,///微信
ThirdLoginType_QQ = 2,///QQ
ThirdLoginType_Apple = 5,///苹果登录
typedef NS_ENUM(NSInteger, MewGenderType) {
MewGenderType_Male = 1,///男性
MewGenderType_Female = 2,///女性
};
typedef NS_ENUM(NSInteger, GenderType) {
GenderType_Male = 1,///男性
GenderType_Female = 2,///女性
};
/// @param type 类型 业务类型必填1注册2登录3重设密码4绑定手机5绑定xczAccount6重设xcz密码7解绑手机
typedef NS_ENUM(NSUInteger, GetSmsType) {
GetSmsType_Regist = 1,///注册
GetSmsType_Login = 2,///登录
GetSmsType_Reset_Password = 3,///重设密码
GetSmsType_Bind_Phone = 4, ///绑定手机
GetSmsType_Bind_ZF = 5,
GetSmsType_Reset_ZF = 6,///重设支付密码
GetSmsType_Unbind_Phone = 7, ///解绑手机
/// @param type 类型 业务类型必填1注册2登录3重设密码4绑定手机7解绑手机
typedef NS_ENUM(NSUInteger, MewGetSmsType) {
MewGetSmsType_Regist = 1,///注册
MewGetSmsType_Login = 2,///登录
MewGetSmsType_Reset_Password = 3,///重设密码
MewGetSmsType_Bind_Phone = 4, ///绑定手机
MewGetSmsType_Unbind_Phone = 7, ///解绑手机
};
#endif /* MewEnum_h */

View File

@@ -163,7 +163,7 @@
self.voiceString = @"这个人很懒还没有签名";
}
[self.presenter mewPublishVoiceShowDura:[NSString stringWithFormat:@"%ld",self.duration] desc:self.voiceString gender:self.selfMineModel.gender == GenderType_Male ? @"1" : @"2" url:fileUrl];
[self.presenter mewPublishVoiceShowDura:[NSString stringWithFormat:@"%ld",self.duration] desc:self.voiceString gender:self.selfMineModel.gender == MewGenderType_Male ? @"1" : @"2" url:fileUrl];
}

View File

@@ -36,14 +36,6 @@ typedef enum : NSUInteger {
///
@property (nonatomic, strong) UIButton *closeButton;
///
//
@property (nonatomic, strong) UILabel *voiceTitleLabel;
@property (nonatomic, strong) UIView *voiceView;
@property (nonatomic, strong) NSMutableArray<UIButton *> *voiceButtonArrays;
@property (nonatomic, strong) NSArray<NSString *> *voiceTitleArrays;
@property (nonatomic, strong) NSArray<NSString *> *voiceImageArrays;
///
//
@property (nonatomic, strong) UIView *longTapView;
@@ -120,48 +112,20 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
self = [super initWithFrame:frame];
if (self) {
// self.recordVoiceState = RecordVoiceState_Record_Normal;
self.backgroundColor = UIColorMewRGBAlpha(0x000000, 0.5);
self.voiceButtonArrays = [NSMutableArray array];
self.voiceTitleArrays = @[@"无效果", @"恐怖", @"成熟", @"萝莉"];
self.voiceImageArrays = @[@"mew_home_change_voice_defalut",@"mew_home_change_voice_horror",@"mew_home_change_voice_mature",@"mew_home_change_voice_girl"];
[self mew_initView];
[self mew_initLayout];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
}
return self;
}
#pragma mark - NSNotificationCenter
//
- (void)keyboardWillShow:(NSNotification *)notification {
NSDictionary *dict = [notification userInfo];
NSValue *value = [dict objectForKey:UIKeyboardFrameEndUserInfoKey];
CGFloat height = [value CGRectValue].size.height;
}
//
- (void)keyboardWillHide:(NSNotification *)notification {
NSDictionary *dict = [notification userInfo];
NSValue *value = [dict objectForKey:UIKeyboardFrameBeginUserInfoKey];
CGFloat height = [value CGRectValue].size.height;
}
#pragma mark - Action Event
- (void)closeButtonAction {
[MewPushExclusiveVoiceView removeExclusiveViewFromSuperView];
}
///
- (void)muteVoiceTapGesture:(UITapGestureRecognizer *)tap {
// NSLog(@"选中变声");
}
///
- (void)longRecordTapGesutre:(UITapGestureRecognizer *)longTap {
if (self.recordVoiceState == RecordVoiceState_Record_End || self.recordVoiceState == RecordVoiceState_Record_Start) return;
@@ -226,20 +190,11 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
[self.delegate mewPushExclusiveVoice:self.totalFilePath voiceIntroString:self.textView.text dura:self.duration];
}
NSLog(@"发布录制声音");
}
///
- (void)muteButtonAction:(UIButton *)sender {
for (UIButton *button in self.voiceButtonArrays) {
button.selected = NO;
}
sender.selected = YES;
}
#pragma mark - UITextViewDelegate
- (void)textViewDidChange:(UITextView *)textView {
NSLog(@"当前textview。text:%@",textView.text);
if (textView.text.length == 0 || [textView.text isEqualToString:@""]) {
self.placeholdLabel.hidden = NO;
} else {
@@ -419,10 +374,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
[self addSubview:self.whiteBgView];
[self.whiteBgView addSubview:self.titleLabel];
[self.whiteBgView addSubview:self.closeButton];
///
[self.whiteBgView addSubview:self.voiceTitleLabel];
[self.whiteBgView addSubview:self.voiceView];
[self initWithMuteVoice];
///
[self.whiteBgView addSubview:self.longTapView];
[self.longTapView addSubview:self.longTapTitleLabel];
@@ -453,23 +405,12 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
make.centerY.equalTo(self.titleLabel);
}];
///
[self.voiceTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.titleLabel.mas_bottom).offset(20);
make.left.equalTo(self.whiteBgView).offset(10);
}];
[self.voiceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.voiceTitleLabel.mas_bottom).offset(12.0);
make.left.equalTo(self.voiceTitleLabel);
make.right.equalTo(self.whiteBgView).offset(-10);
}];
///
[self.longTapView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.whiteBgView);
make.width.height.mas_equalTo(68);
make.top.equalTo(self.voiceView.mas_bottom).offset(16);
make.top.equalTo(self.titleLabel.mas_bottom).offset(16);
}];
[self.longTapTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -523,47 +464,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
}];
}
- (void)initWithMuteVoice {
/// view
for (int i = 0; i < self.voiceTitleArrays.count; i++) {
CGFloat imageWidth = 60;
CGFloat marginX = (KScreenWidth - 48 - 20.0 - 4 * imageWidth)/5;
UIButton *muteButton = [[UIButton alloc] init];
muteButton.backgroundColor = [MewThemeColor mewColorWithHexString:@"#444F75"];
[muteButton setImage:[UIImage imageNamed:@"mew_home_change_voice_bg"] forState:UIControlStateSelected];
[muteButton setImage:[UIImage imageNamed:@"mew_home_change_voice_nomarl"] forState:UIControlStateNormal];
muteButton.layer.cornerRadius = 8;
muteButton.layer.masksToBounds = YES;
muteButton.selected = i == 0 ? YES : NO;
[muteButton addTarget:self action:@selector(muteButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.voiceButtonArrays addObject:muteButton];
[self.voiceView addSubview:muteButton];
[muteButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.voiceView);
make.width.height.mas_equalTo(imageWidth);
make.left.mas_equalTo(i * (imageWidth + marginX) + marginX);
}];
UIImageView *muteImageView = [[UIImageView alloc] init];
muteImageView.image = [UIImage imageNamed:self.voiceImageArrays[i]];
[self.voiceView addSubview:muteImageView];
[muteImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(muteButton);
}];
UILabel *muteLabel = [[UILabel alloc] init];
muteLabel.text = self.voiceTitleArrays[i];
muteLabel.font = kFontRegular(12);
muteLabel.textColor = [MewThemeColor mewColorWithHexString:@"#F0F0F0"];
[self.voiceView addSubview:muteLabel];
[muteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(muteImageView.mas_bottom).offset(5.0);
make.centerX.equalTo(muteImageView);
make.height.mas_equalTo(12);
make.bottom.equalTo(self.voiceView);
}];
}
}
#pragma mark - Get
- (void)setRecordVoiceState:(RecordVoiceState)recordVoiceState {
@@ -610,24 +511,6 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
return _closeButton;
}
///
- (UILabel *)voiceTitleLabel {
if (!_voiceTitleLabel) {
_voiceTitleLabel = [[UILabel alloc] init];
_voiceTitleLabel.text = @"设置变声更有趣";
_voiceTitleLabel.font = kFontMedium(14);
_voiceTitleLabel.textColor = UIColor.whiteColor;
}
return _voiceTitleLabel;
}
- (UIView *)voiceView {
if (!_voiceView) {
_voiceView = [[UIView alloc] init];
}
return _voiceView;
}
///
- (UIView *)longTapView {

View File

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface MewRightFollowVoiceCollectionCell : UICollectionViewCell
@property (nonatomic, copy) NSString *avater;
@property (nonatomic, copy) NSString *nick;
@property (nonatomic, assign) GenderType sex;
@property (nonatomic, assign) MewGenderType sex;
@end
NS_ASSUME_NONNULL_END

View File

@@ -42,9 +42,9 @@
self.nickNameLabel.text =_nick;
}
- (void)setSex:(GenderType)sex {
- (void)setSex:(MewGenderType)sex {
_sex = sex;
self.sexImageView.image = [UIImage imageNamed: _sex == GenderType_Male ? @"common_male" : @"common_female"];
self.sexImageView.image = [UIImage imageNamed: _sex == MewGenderType_Male ? @"common_male" : @"common_female"];
}
#pragma mark - Init View

View File

@@ -100,7 +100,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
if (_userIntroductionView == nil) return;
_userIntroductionView.currentUserInfo = userInfo;
_userIntroductionView.nickNameLabel.text = userInfo.nick;
_userIntroductionView.sexImageView.image = [UIImage imageNamed:userInfo.gender == GenderType_Male ? @"mew_home_user_man" : @"mew_home_user_woman"];
_userIntroductionView.sexImageView.image = [UIImage imageNamed:userInfo.gender == MewGenderType_Male ? @"mew_home_user_man" : @"mew_home_user_woman"];
_userIntroductionView.iconImageView.imageUrl = userInfo.avatar;
//

View File

@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type;
/// 没有登录的时候 重置密码
/// @param phone 手机号

View File

@@ -24,7 +24,7 @@
///
/// @param phone
/// @param type
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type {
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(id _Nonnull data) {
[[self mew_getView] mew_phoneSmsCodeSuccess];

View File

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type;
/// 校验手机验证码接口
/// @param moblieNum 手机号码

View File

@@ -19,7 +19,7 @@
///
/// @param phone
/// @param type
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type {
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) {

View File

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type;
/// 使用手机号和验证码登录
/// @param phone 手机号

View File

@@ -27,7 +27,7 @@
///
/// @param phone
/// @param type
- (void)mew_phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
- (void)mew_phoneSmsCode:(NSString *)phone type:(MewGetSmsType)type {
NSString *desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
[Api Mew_PhoneSmsCode:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) {

View File

@@ -50,7 +50,7 @@
}
- (void)viewDidAppear:(BOOL)animated {
[self mew_showErrorToast:@"第三方登录需绑定手机号喔~"];
// [self mew_showErrorToast:@"第三方登录需绑定手机号喔~"];
}
- (void)mew_setUpUI {

View File

@@ -100,7 +100,7 @@
if (self.phoneView.textField.text.length != 11) {
[self mew_showErrorToast:@"请输入正确的手机号码"];
} else {
[self.presenter mew_phoneSmsCode:self.phoneView.textField.text type:GetSmsType_Reset_Password];
[self.presenter mew_phoneSmsCode:self.phoneView.textField.text type:MewGetSmsType_Reset_Password];
}
}

View File

@@ -203,7 +203,7 @@
}
}] subscribeNext:^(id _Nullable x) {
@strongify(self);
[self.presenter mew_phoneSmsCode:self.phoneNumTextField.text type:self.bindingPhoneNumType == MewBindingPhoneNumTypeConfirm ? GetSmsType_Unbind_Phone : GetSmsType_Bind_Phone];
[self.presenter mew_phoneSmsCode:self.phoneNumTextField.text type:self.bindingPhoneNumType == MewBindingPhoneNumTypeConfirm ? MewGetSmsType_Unbind_Phone : MewGetSmsType_Bind_Phone];
}];

View File

@@ -35,16 +35,8 @@
UIKIT_EXTERN NSString * const kYinyouPrivateKey;
NSString * const kPhoneQuickPrivacyKey = @"PhoneQuickPrivacyKey";
NSString * const kHadAgreePrivacy = @"HadAgreePrivacy";
typedef NS_ENUM(NSUInteger, XYLoginType) {
XYLoginTypeUnknow = 0, //
XYLoginTypeTelecom = 1, //
XYLoginTypeChinaMobile = 2, //
XYLoginTypeUnicom = 3 //
};
@interface MewLoginViewController ()<ASAuthorizationControllerDelegate,ASAuthorizationControllerPresentationContextProviding>
@property (nonatomic, strong) UIView *contentView;
@@ -53,7 +45,10 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
//@property (nonatomic, strong) UIStackView *stackView;
///
@property (nonatomic, strong) MewButton *appleButtonView;
//@property (nonatomic, strong) MewButton *appleButtonView;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
@property (nonatomic, strong) ASAuthorizationAppleIDButton *appleButton;
#endif
/** */
@property (nonatomic, strong) UIButton *agreeButton;
@@ -114,13 +109,12 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
[self.view addSubview:self.leftLineView];
[self.view addSubview:self.rightLineView];
[self.view addSubview:self.otherLoginTitleLabel];
[self.view addSubview:self.appleButtonView];
[self.view addSubview:self.appleButton];
}
- (void)mew_setUpConstraints {
CGFloat kscale = 363.0 / 375.0;
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
@@ -153,21 +147,14 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
}];
// [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 60);
// make.centerX.mas_equalTo(self.view);
// make.height.mas_equalTo(75);
// }];
[self.appleButtonView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.appleButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 60);
make.centerX.mas_equalTo(self.view);
make.height.mas_equalTo(75);
make.width.height.mas_equalTo(40);
}];
[self.agreeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.appleButtonView.mas_bottom).offset(20);
make.top.mas_equalTo(self.appleButton.mas_bottom).offset(20);
make.height.mas_equalTo(40);
make.width.mas_equalTo(220);
make.centerX.mas_equalTo(self.view).mas_offset(15 - 6);
@@ -192,7 +179,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
}];
[self.otherLoginTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.appleButtonView.mas_top).offset(-32);
make.bottom.equalTo(self.appleButton.mas_top).offset(-32);
make.centerX.equalTo(self.view);
}];
[self.leftLineView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -216,19 +203,15 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
self.leftLineView.hidden = NO;
self.rightLineView.hidden = NO;
self.otherLoginTitleLabel.hidden = NO;
self.appleButtonView.hidden = NO;
self.appleButton.hidden = NO;
} else {
self.leftLineView.hidden = YES;
self.rightLineView.hidden = YES;
self.otherLoginTitleLabel.hidden = YES;
self.appleButtonView.hidden = YES;
self.appleButton.hidden = YES;
}
}
#pragma mark - MewLoginProtocol
- (void)mew_loginSuccess {
[self dismissViewControllerAnimated:YES completion:nil];
@@ -272,7 +255,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
return;
}
if (@available(iOS 13.0, *)) {
// Apple ID
ASAuthorizationAppleIDProvider * appleIDProvider = [[ASAuthorizationAppleIDProvider alloc] init];
@@ -304,16 +286,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
}
/// || || Apple
//- (void)didClickRecognizer:(UITapGestureRecognizer *)tap {
// if (!self.agreeButton.isSelected) {
// [MewHUDTool showErrorWithMessage:@"请勾选协议"];
// return;
// }
//
// MewLoginNumberViewController *controller = [[MewLoginNumberViewController alloc] init];
// [self.navigationController pushViewController:controller animated:NO];
//}
#pragma mark - ASAuthorizationControllerDelegate
//
@@ -363,7 +335,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
// 使
ASPasswordCredential * passwordCredential = (ASPasswordCredential *)authorization.credential;
//
NSString * user = passwordCredential.user;
// NSString * user = passwordCredential.user;
//
@@ -419,9 +391,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
[MewThemeColor mewColorWithHexString:@"##8974FF"],
[MewThemeColor mewColorWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 80, 52)];
_loginButton.backgroundColor = [UIColor colorWithPatternImage:bgImage];
// [_loginButton setTitleColor:ThemeColor.mewMainTextColor forState:UIControlStateNormal];
// UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewConfirmButtonGradientStartColor],[MewThemeColor mewConfirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 52 * 2, 45)];
// [_loginButton setBackgroundImage:image forState:UIControlStateNormal];
[_loginButton addTarget:self action:@selector(mew_loginButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _loginButton;
@@ -433,7 +402,6 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
[_agreeButton setImage:[UIImage imageNamed:@"mew_login_agree_normal"] forState:UIControlStateNormal];
[_agreeButton setImage:[UIImage imageNamed:@"mew_login_agree_sel"] forState:UIControlStateSelected];
[_agreeButton addTarget:self action:@selector(mew_agreeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
// _agreeButton.backgroundColor = UIColor.blueColor;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *hadAgree = [defaults objectForKey:kHadAgreePrivacy];
if (hadAgree.length > 0) {
@@ -474,12 +442,11 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
NSString *protocolString = @"《隐私政策》";
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:UIColor.whiteColor}];
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
// @strongify(self);
__strong typeof(self) strongSelf = weakSelf;
//
MewWebViewController * webVC = [[MewWebViewController alloc] init];
webVC.url = URLWithType(kPrivacyURL);
[self.navigationController pushViewController:webVC animated:YES];
[strongSelf.navigationController pushViewController:webVC animated:YES];
} longPressAction:nil];
[attString appendAttributedString:userAttString];
[attString appendAttributedString:andString];
@@ -513,45 +480,21 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
return _contentView;
}
//- (UIStackView *)stackView {
// if (!_stackView) {
// _stackView = [[UIStackView alloc] init];
// _stackView.distribution = UIStackViewDistributionEqualSpacing;
// _stackView.spacing = 32;
// _stackView.axis = UILayoutConstraintAxisHorizontal;
// _stackView.alignment = UIStackViewAlignmentFill;
// }
// return _stackView;
//}
- (MewButton *)appleButtonView { //
if (!_appleButtonView) {
_appleButtonView = [[MewButton alloc] initWithImagePosition:MewButtonImagePositionTop];
[_appleButtonView setImage: [UIImage imageNamed:@"mew_login_apple"] forState:UIControlStateNormal];
[_appleButtonView setTitle:@"苹果登录" forState:UIControlStateNormal];
[_appleButtonView setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
_appleButtonView.titleLabel.font = kFontRegular(12);
_appleButtonView.imageTitleSpace = 5.0;
[_appleButtonView addTarget:self action:@selector(mew_loginWithApple) forControlEvents:UIControlEventTouchUpInside];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
- (ASAuthorizationAppleIDButton *)appleButton API_AVAILABLE(ios(13.0)){ //
if (!_appleButton) {
if (@available(iOS 13.0, *)) {
_appleButton = [[ASAuthorizationAppleIDButton alloc] initWithAuthorizationButtonType:ASAuthorizationAppleIDButtonTypeContinue authorizationButtonStyle:ASAuthorizationAppleIDButtonStyleWhite];
}
return _appleButtonView;
}
//#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
//- (ASAuthorizationAppleIDButton *)appleButton API_AVAILABLE(ios(13.0)){ //
// if (!_appleButton) {
// if (@available(iOS 13.0, *)) {
// _appleButton = [[ASAuthorizationAppleIDButton alloc] initWithAuthorizationButtonType:ASAuthorizationAppleIDButtonTypeSignIn authorizationButtonStyle:ASAuthorizationAppleIDButtonStyleWhite];
// } else {
// // Fallback on earlier versions
// }
// _appleButton.cornerRadius = 25;
// _appleButton.tag = 1000 + ThirdLoginType_Apple;
//// _appleButton.hidden = NO;
// }
// return _appleButton;
//}
//#endif
_appleButton.cornerRadius = 20;
[_appleButton addTarget:self action:@selector(mew_loginWithApple) forControlEvents:UIControlEventTouchUpInside];
}
return _appleButton;
}
#endif
- (UIImageView *)bgImageView {
if (!_bgImageView) {

View File

@@ -96,7 +96,7 @@
return;
}
[self.present mew_phoneSmsCode:self.phone type:GetSmsType_Regist];
[self.present mew_phoneSmsCode:self.phone type:MewGetSmsType_Regist];
}
- (void)textFieldDidChange:(UITextField *)text {

View File

@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
///uid
@property (nonatomic,copy) NSString *uid;
///性别
@property (nonatomic,assign) GenderType gender;
@property (nonatomic,assign) MewGenderType gender;
///类型
@property (nonatomic,assign) NSInteger defUser;
///魅力等级

View File

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
///头像
@property (nonatomic, copy) NSString *avatar;
///性别
@property (nonatomic,assign) GenderType gender;
@property (nonatomic,assign) MewGenderType gender;
///姓名
@property (nonatomic,copy) NSString *nick;
///用户的uid
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
///tag的图片
@property (nonatomic,copy) NSString *tagPict;
///性别
@property (nonatomic,assign) GenderType gender;
@property (nonatomic,assign) MewGenderType gender;
///房主的昵称
@property (nonatomic,copy) NSString *nick;
///房间的id

View File

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface MewMessageRemoteExtModel : NSObject
@property (nonatomic,assign) NSInteger erbanNo;
///性别
@property (nonatomic, assign) GenderType gender;
@property (nonatomic, assign) MewGenderType gender;
///贵族icon
@property (nonatomic, copy) NSString *vipIcon;
///账号的类型

View File

@@ -104,7 +104,7 @@
if(userInfo) {
self.avatarImageView.imageUrl = userInfo.avatar;
[self.postionLabel setBackgroundColor:userInfo.gender == GenderType_Male ? UIColorMewFromRGB(0x3EBBFE) : UIColorMewFromRGB(0xFF5E83)];
[self.postionLabel setBackgroundColor:userInfo.gender == MewGenderType_Male ? UIColorMewFromRGB(0x3EBBFE) : UIColorMewFromRGB(0xFF5E83)];
self.nickLabel.text = userInfo.nick.length > 5 ? [NSString stringWithFormat:@"%@…",[userInfo.nick substringToIndex:5]] : userInfo.nick;
self.nickLabel.textColor = userInfo.micNickColor.length > 0 ? [MewThemeColor mewColorWithHexString: userInfo.micNickColor] : UIColorMewFromRGB(0xFFFFFF);
@@ -112,7 +112,7 @@
if (self.microModel.microState.position == -1) {
self.sexImageView.hidden = NO;
self.postionLabel.hidden = YES;
self.sexImageView.image = [UIImage imageNamed: userInfo.gender == GenderType_Male ? @"common_male" : @"common_female"];
self.sexImageView.image = [UIImage imageNamed: userInfo.gender == MewGenderType_Male ? @"common_male" : @"common_female"];
}
} else {

View File

@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface MewMicroExtModel : NSObject
///
@property (nonatomic,assign) GenderType gender;
@property (nonatomic,assign) MewGenderType gender;
///
@property (nonatomic,copy) NSString *avatar;
///