1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //
- // XYVocieRoomCommonMethod.m
- // Starbuds
- //
- // Created by 翟玉磊 on 2020/7/7.
- // Copyright © 2020 翟玉磊. All rights reserved.
- //
- #import "XYVocieRoomCommonMethod.h"
- @implementation XYVocieRoomCommonMethod
- /// 根据角色类型获取该类型的文本
- + (NSString *)getVoiceRoomRoleTextWithRole:(XYVoiceRoomRole)role {
- NSString *text = @"";
- switch (role) {
- case XYVoiceRoomRoleAudience:
- text = kLocalizedString(@"观众");
- break;
- case XYVoiceRoomRoleMaster:
- text = kLocalizedString(@"房管");
- break;
- case XYVoiceRoomRoleHost:
- text = kLocalizedString(@"主持人");
- break;
- case XYVoiceRoomRoleAdmin:
- text = kLocalizedString(@"房主");
- break;
- case XYVoiceRoomRoleSuper:
- text = kLocalizedString(@"超管");
- break;
- case XYVoiceRoomRoleOfficial:
- text = kLocalizedString(@"官方");
- break;
- }
- return text;
- }
- /// 根据类型获取相亲房进程文本
- + (NSString *)getLoveProgressTextWithStage:(XYVoiceRoomLoveStage)stage {
- NSString *text = @"";
- switch (stage) {
- case XYVoiceRoomLoveStageReady:
- text = kLocalizedString(@"嘉宾上座");
- break;
- case XYVoiceRoomLoveStageIntro:
- text = kLocalizedString(@"自我介绍");
- break;
- case XYVoiceRoomLoveStageStandard:
- text = kLocalizedString(@"择偶标准");
- break;
- case XYVoiceRoomLoveStageQuestion:
- text = kLocalizedString(@"真爱问答");
- break;
- case XYVoiceRoomLoveStageChoose:
- text = kLocalizedString(@"心动选人");
- break;
- case XYVoiceRoomLoveStageMatch:
- text = kLocalizedString(@"公布心动");
- break;
- }
- return text;
- }
- /// 获取相亲进程数组 numberYES则带序号1.~
- + (NSArray *)getLoveProgressTitleArrayWithNumber:(BOOL)number {
- if (number) {
- return @[[self getLoveProgressTextWithStage:XYVoiceRoomLoveStageReady],
- [NSString stringWithFormat:@"1.%@", [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageIntro]],
- [NSString stringWithFormat:@"2.%@", [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageStandard]],
- [NSString stringWithFormat:@"3.%@", [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageQuestion]],
- [NSString stringWithFormat:@"4.%@", [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageChoose]],
- [NSString stringWithFormat:@"5.%@", [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageMatch]]];
- }
- return @[[self getLoveProgressTextWithStage:XYVoiceRoomLoveStageReady],
- [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageIntro],
- [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageStandard],
- [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageQuestion],
- [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageChoose],
- [self getLoveProgressTextWithStage:XYVoiceRoomLoveStageMatch]];
- }
- @end
|