113 lines
3.2 KiB
Objective-C
113 lines
3.2 KiB
Objective-C
//
|
|
// QXConfig.m
|
|
// QXLive
|
|
//
|
|
// Created by 启星 on 2025/4/28.
|
|
//
|
|
|
|
#import "QXConfig.h"
|
|
|
|
@implementation QXConfig
|
|
+ (instancetype)shared {
|
|
static QXConfig *global = nil;
|
|
static dispatch_once_t onceToken;
|
|
dispatch_once(&onceToken, ^{
|
|
global = [[self alloc] init];
|
|
});
|
|
return global;
|
|
}
|
|
+(QXConfig *)defaultConfig{
|
|
QXConfig *config = [QXConfig shared];
|
|
config.textColor = RGB16(0x000000);
|
|
config.backgroundImage = @"app_bg";
|
|
config.placehoulderTextColor = RGB16(0x9b9b9b);
|
|
/// appstore
|
|
config.themeColor = RGB16(0x3ABC6D);
|
|
config.btnTextColor = RGB16(0xffffff);
|
|
|
|
// config.themeColor = RGB16(0xFC7285);
|
|
// config.btnTextColor = RGB16(0xFFFFFF);
|
|
|
|
QXTabbarModel *index1 = [[QXTabbarModel alloc] init];
|
|
index1.title = QXText(@"首页");
|
|
index1.selectedImage = @"qx_tabbar_home_sel";
|
|
index1.normalImage = @"qx_tabbar_home_nor";
|
|
QXTabbarModel *index2 = [[QXTabbarModel alloc] init];
|
|
index2.title = QXText(@"广场");
|
|
index2.selectedImage = @"qx_tabbar_find_sel";
|
|
index2.normalImage = @"qx_tabbar_find_nor";
|
|
// QXTabbarModel *index3 = [[QXTabbarModel alloc] init];
|
|
// index3.title = QXText(@"音信");
|
|
// index3.selectedImage = @"qx_tabbar_party";
|
|
// index3.normalImage = @"qx_tabbar_party";
|
|
QXTabbarModel *index4 = [[QXTabbarModel alloc] init];
|
|
index4.title = QXText(@"消息");
|
|
index4.selectedImage = @"qx_tabbar_message_sel";
|
|
index4.normalImage = @"qx_tabbar_message_nor";
|
|
QXTabbarModel *index5 = [[QXTabbarModel alloc] init];
|
|
index5.title = QXText(@"我的");
|
|
index5.selectedImage = @"qx_tabbar_me_sel";
|
|
index5.normalImage = @"qx_tabbar_me_nor";
|
|
NSArray *tabbarArr = @[index1,index2,index4,index5];
|
|
config.tabbarArray = tabbarArr;
|
|
|
|
QXShareViewModel *platform1 = [[QXShareViewModel alloc] init];
|
|
platform1.name = QXText(@"微信好友");
|
|
platform1.icon = @"share_wechat";
|
|
|
|
QXShareViewModel *platform2 = [[QXShareViewModel alloc] init];
|
|
platform2.name = QXText(@"朋友圈");
|
|
platform2.icon = @"share_wechat_moments";
|
|
|
|
config.sharePlatforms = @[platform1,platform2];
|
|
// QXShareViewModel *platform3 = [[QXShareViewModel alloc] init];
|
|
// platform3.name = QXText(@"QQ");
|
|
// platform3.icon = @"share_wechat_moments";
|
|
//
|
|
// QXShareViewModel *platform4 = [[QXShareViewModel alloc] init];
|
|
// platform4.name = QXText(@"QQ空间");
|
|
// platform4.icon = @"share_wechat";
|
|
|
|
// config.sharePlatforms = @[platform1,platform2,platform3,platform4];
|
|
|
|
return config;
|
|
}
|
|
+(UIColor *)textColor{
|
|
return [QXConfig shared].textColor;
|
|
}
|
|
+(UIColor*)placehoulderTextColor{
|
|
return [QXConfig shared].placehoulderTextColor;
|
|
}
|
|
+(NSString*)backgroundImage{
|
|
return [QXConfig shared].backgroundImage;
|
|
}
|
|
+(UIColor *)themeColor{
|
|
return [QXConfig shared].themeColor;
|
|
}
|
|
+(UIColor *)btnTextColor{
|
|
return [QXConfig shared].btnTextColor;
|
|
}
|
|
+(NSArray *)tabbarArray{
|
|
return [QXConfig shared].tabbarArray;
|
|
}
|
|
+(NSArray *)sharePlatforms{
|
|
return [QXConfig shared].sharePlatforms;
|
|
}
|
|
+(void)saveConfigWithDict:(NSDictionary *)config{
|
|
|
|
}
|
|
@end
|
|
|
|
@implementation QXTabbarModel
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
@implementation QXThemeModel
|
|
|
|
|
|
|
|
@end
|