diff --git a/ShenQi.xcodeproj/project.pbxproj b/ShenQi.xcodeproj/project.pbxproj index 32a9eea..335772d 100644 --- a/ShenQi.xcodeproj/project.pbxproj +++ b/ShenQi.xcodeproj/project.pbxproj @@ -649,7 +649,7 @@ ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = ShenQi/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = MENANG77; + INFOPLIST_KEY_CFBundleDisplayName = OKEGO; INFOPLIST_KEY_NSAppleMusicUsageDescription = "需要访问相册权限用于照片上传,应用不会上传和存储您的照片"; INFOPLIST_KEY_NSCameraUsageDescription = "需要相机权限用于拍照上传,应用不会上传和存储您的照片"; INFOPLIST_KEY_NSContactsUsageDescription = "用于匹配您的好友"; @@ -671,8 +671,8 @@ "$(inherited)", "$(PROJECT_DIR)/ShenQi", ); - MARKETING_VERSION = 3.5; - PRODUCT_BUNDLE_IDENTIFIER = noti.MENANG77; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = noti.OKEGO; PRODUCT_NAME = TESTAPP; PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -700,7 +700,7 @@ ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = ShenQi/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = MENANG77; + INFOPLIST_KEY_CFBundleDisplayName = OKEGO; INFOPLIST_KEY_NSAppleMusicUsageDescription = "需要访问相册权限用于照片上传,应用不会上传和存储您的照片"; INFOPLIST_KEY_NSCameraUsageDescription = "需要相机权限用于拍照上传,应用不会上传和存储您的照片"; INFOPLIST_KEY_NSContactsUsageDescription = "用于匹配您的好友"; @@ -722,8 +722,8 @@ "$(inherited)", "$(PROJECT_DIR)/ShenQi", ); - MARKETING_VERSION = 3.5; - PRODUCT_BUNDLE_IDENTIFIER = noti.MENANG77; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = noti.OKEGO; PRODUCT_NAME = TESTAPP; PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/ShenQi.xcodeproj/xcshareddata/xcschemes/ShenQi.xcscheme b/ShenQi.xcodeproj/xcshareddata/xcschemes/ShenQi.xcscheme index 5236f3d..39e79e9 100644 --- a/ShenQi.xcodeproj/xcshareddata/xcschemes/ShenQi.xcscheme +++ b/ShenQi.xcodeproj/xcshareddata/xcschemes/ShenQi.xcscheme @@ -31,7 +31,7 @@ + + diff --git a/ShenQi/Assets.xcassets/AppIcon.appiconset/Contents.json b/ShenQi/Assets.xcassets/AppIcon.appiconset/Contents.json index 1492e14..2863fbd 100644 --- a/ShenQi/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ShenQi/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "MENANG77.png", + "filename" : "微信图片_20250819133612_1137.jpg", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/ShenQi/Assets.xcassets/AppIcon.appiconset/MENANG77.png b/ShenQi/Assets.xcassets/AppIcon.appiconset/MENANG77.png deleted file mode 100644 index 9eeba6e..0000000 Binary files a/ShenQi/Assets.xcassets/AppIcon.appiconset/MENANG77.png and /dev/null differ diff --git a/ShenQi/Assets.xcassets/AppIcon.appiconset/微信图片_20250819133612_1137.jpg b/ShenQi/Assets.xcassets/AppIcon.appiconset/微信图片_20250819133612_1137.jpg new file mode 100644 index 0000000..b1e84cc Binary files /dev/null and b/ShenQi/Assets.xcassets/AppIcon.appiconset/微信图片_20250819133612_1137.jpg differ diff --git a/ShenQi/Assets.xcassets/appLogo.imageset/Contents.json b/ShenQi/Assets.xcassets/appLogo.imageset/Contents.json index f1fc8c7..eb21ba3 100644 --- a/ShenQi/Assets.xcassets/appLogo.imageset/Contents.json +++ b/ShenQi/Assets.xcassets/appLogo.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "MENANG77.png", + "filename" : "微信图片_20250819133612_1137.jpg", "idiom" : "universal", "scale" : "1x" }, diff --git a/ShenQi/Assets.xcassets/appLogo.imageset/MENANG77.png b/ShenQi/Assets.xcassets/appLogo.imageset/MENANG77.png deleted file mode 100644 index 9eeba6e..0000000 Binary files a/ShenQi/Assets.xcassets/appLogo.imageset/MENANG77.png and /dev/null differ diff --git a/ShenQi/Assets.xcassets/appLogo.imageset/微信图片_20250819133612_1137.jpg b/ShenQi/Assets.xcassets/appLogo.imageset/微信图片_20250819133612_1137.jpg new file mode 100644 index 0000000..b1e84cc Binary files /dev/null and b/ShenQi/Assets.xcassets/appLogo.imageset/微信图片_20250819133612_1137.jpg differ diff --git a/ShenQi/Assets.xcassets/icon/Contents.json b/ShenQi/Assets.xcassets/icon/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ShenQi/Assets.xcassets/icon/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ShenQi/Assets.xcassets/icon/home2.imageset/Contents.json b/ShenQi/Assets.xcassets/icon/home2.imageset/Contents.json new file mode 100644 index 0000000..bbf58d3 --- /dev/null +++ b/ShenQi/Assets.xcassets/icon/home2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "微信图片_20250618144512_1271.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ShenQi/Assets.xcassets/icon/home2.imageset/微信图片_20250618144512_1271.png b/ShenQi/Assets.xcassets/icon/home2.imageset/微信图片_20250618144512_1271.png new file mode 100644 index 0000000..bf3cace Binary files /dev/null and b/ShenQi/Assets.xcassets/icon/home2.imageset/微信图片_20250618144512_1271.png differ diff --git a/ShenQi/Assets.xcassets/icon/menu2.imageset/Contents.json b/ShenQi/Assets.xcassets/icon/menu2.imageset/Contents.json new file mode 100644 index 0000000..7e661cb --- /dev/null +++ b/ShenQi/Assets.xcassets/icon/menu2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "微信图片_20250618144518_1272.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ShenQi/Assets.xcassets/icon/menu2.imageset/微信图片_20250618144518_1272.png b/ShenQi/Assets.xcassets/icon/menu2.imageset/微信图片_20250618144518_1272.png new file mode 100644 index 0000000..1677bda Binary files /dev/null and b/ShenQi/Assets.xcassets/icon/menu2.imageset/微信图片_20250618144518_1272.png differ diff --git a/ShenQi/Assets.xcassets/icon/missav2.imageset/Contents.json b/ShenQi/Assets.xcassets/icon/missav2.imageset/Contents.json new file mode 100644 index 0000000..f0de32a --- /dev/null +++ b/ShenQi/Assets.xcassets/icon/missav2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "微信图片_20250618144501_1269.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ShenQi/Assets.xcassets/icon/missav2.imageset/微信图片_20250618144501_1269.png b/ShenQi/Assets.xcassets/icon/missav2.imageset/微信图片_20250618144501_1269.png new file mode 100644 index 0000000..6946286 Binary files /dev/null and b/ShenQi/Assets.xcassets/icon/missav2.imageset/微信图片_20250618144501_1269.png differ diff --git a/ShenQi/Assets.xcassets/icon/noti2.imageset/Contents.json b/ShenQi/Assets.xcassets/icon/noti2.imageset/Contents.json new file mode 100644 index 0000000..46e62e5 --- /dev/null +++ b/ShenQi/Assets.xcassets/icon/noti2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "微信图片_20250618144523_1273.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ShenQi/Assets.xcassets/icon/noti2.imageset/微信图片_20250618144523_1273.png b/ShenQi/Assets.xcassets/icon/noti2.imageset/微信图片_20250618144523_1273.png new file mode 100644 index 0000000..b363f0d Binary files /dev/null and b/ShenQi/Assets.xcassets/icon/noti2.imageset/微信图片_20250618144523_1273.png differ diff --git a/ShenQi/Assets.xcassets/icon/refresh2.imageset/Contents.json b/ShenQi/Assets.xcassets/icon/refresh2.imageset/Contents.json new file mode 100644 index 0000000..b306c31 --- /dev/null +++ b/ShenQi/Assets.xcassets/icon/refresh2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "微信图片_20250618144508_1270.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ShenQi/Assets.xcassets/icon/refresh2.imageset/微信图片_20250618144508_1270.png b/ShenQi/Assets.xcassets/icon/refresh2.imageset/微信图片_20250618144508_1270.png new file mode 100644 index 0000000..ba1126b Binary files /dev/null and b/ShenQi/Assets.xcassets/icon/refresh2.imageset/微信图片_20250618144508_1270.png differ diff --git a/ShenQi/Base.lproj/LaunchScreen.storyboard b/ShenQi/Base.lproj/LaunchScreen.storyboard index 089a81a..783c23e 100644 --- a/ShenQi/Base.lproj/LaunchScreen.storyboard +++ b/ShenQi/Base.lproj/LaunchScreen.storyboard @@ -18,7 +18,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/ShenQi/Base.lproj/Main.storyboard b/ShenQi/Base.lproj/Main.storyboard index ce4c4ed..b0ff8f3 100644 --- a/ShenQi/Base.lproj/Main.storyboard +++ b/ShenQi/Base.lproj/Main.storyboard @@ -106,7 +106,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -123,7 +123,7 @@ - + diff --git a/ShenQi/GoogleService-Info.plist b/ShenQi/GoogleService-Info.plist index 2d1e587..145eb7f 100644 --- a/ShenQi/GoogleService-Info.plist +++ b/ShenQi/GoogleService-Info.plist @@ -3,17 +3,17 @@ API_KEY - AIzaSyCuzddNSARpVhzTZUYZHDm_DzAnmDy9Yeg + AIzaSyBzxoVTlQF1Q7XEFqWAiS9dIFEZkcFk-o0 GCM_SENDER_ID - 940761404240 + 989163327252 PLIST_VERSION 1 BUNDLE_ID - noti.MENANG77 + noti.OKEGO PROJECT_ID - menang77-bceef + okego-a50f6 STORAGE_BUCKET - menang77-bceef.firebasestorage.app + okego-a50f6.firebasestorage.app IS_ADS_ENABLED IS_ANALYTICS_ENABLED @@ -25,6 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:940761404240:ios:29c688b5f1ddcd69f7d255 + 1:989163327252:ios:f5e39cecd23cd49a567c01 \ No newline at end of file diff --git a/ShenQi/MacroDefine.h b/ShenQi/MacroDefine.h index fc6579c..8624dd5 100644 --- a/ShenQi/MacroDefine.h +++ b/ShenQi/MacroDefine.h @@ -33,6 +33,7 @@ #define TESTUserID @"2" // 新 +#define AUD2UUserID @"24" #define PPN88UserID @"56" #define MK88AUSUserID @"57" #define BODA8AUUserID @"58" @@ -133,6 +134,35 @@ #define BigBonusUserID @"154" #define SGPLAY77UserID @"155" #define JayaKaya99UserID @"156" +#define JDCLUB9VIPUserID @"158" +#define SANDS33HKUserID @"159" +#define TEALIVE88UserID @"161" +#define BandarJudi33UserID @"162" +#define SonicAUUserID @"164" +#define FlashAUUserID @"165" +#define NovaAUUserID @"166" +#define SprintAUUserID @"167" +#define SwiftAUUserID @"168" +#define SPIN44UserID @"169" +#define CPX88UserID @"170" +#define ONLY1AUUserID @"171" +#define SEMANGAT33UserID @"172" +#define S9ASIAUserID @"173" +#define BANTUAN88UserID @"174" +#define SUREBETUserID @"175" +#define RTF88UserID @"176" +#define PENANG55UserID @"177" +#define BET123UserID @"178" +#define OKEBOSUserID @"179" +#define HOH99UserID @"180" +#define JCPOT868UserID @"181" +#define AFB88UserID @"182" +#define Freecuci365UserID @"183" +#define EASYCUCIUserID @"184" +#define POKIES93UserID @"185" +#define AUKING777UserID @"186" +#define PXP99auUserID @"187" +#define OKEGOUserID @"188" @@ -179,6 +209,7 @@ + #define Play33UserID @"75" #define Boss96UserID @"76" @@ -194,7 +225,7 @@ #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height -#define NowUserId MENANG77UserID +#define NowUserId OKEGOUserID #endif /* MacroDefine_h */ diff --git a/ShenQi/MainOldViewController.m b/ShenQi/MainOldViewController.m index 5d7b63e..4d3709f 100644 --- a/ShenQi/MainOldViewController.m +++ b/ShenQi/MainOldViewController.m @@ -31,6 +31,7 @@ @property (weak, nonatomic) IBOutlet DSWebDragView *webDragView; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *dragHeightConstarint; @property (weak, nonatomic) IBOutlet DSWebMenuCollectionView *webMenuCollectionView; +@property (nonatomic, strong) UIView *subBgView; @end @@ -62,6 +63,11 @@ _webView.navigationDelegate = self; [self.view addSubview:_webView]; + self.subBgView = [[UIView alloc] initWithFrame:self.view.frame]; + self.subBgView.backgroundColor = [UIColor whiteColor]; + self.subBgView.hidden = YES; + [self.view addSubview:self.subBgView]; + NSMutableArray *menuArray = @[].mutableCopy; AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; NSInteger height = 0 ; @@ -73,23 +79,32 @@ height = height + 60; LinkConfig *config = [[LinkConfig alloc] init]; config.isGoBack = YES; - config.icon = @""; - config.name = @"HOME"; + config.icon = @"home2"; + config.name = @"HOME2"; config.linkUrl = appDelegate.mainURLString; [menuArray addObject:config]; + +// height = height + 70; +// +// LinkConfig *config2 = [[LinkConfig alloc] init]; +// config2.isGoBack = NO; +// config2.icon = @"missav2"; +// config2.name = @"missav2"; +// config2.linkUrl = @"https://zh.xhamster.com"; +// [menuArray addObject:config2]; // 菜单 -// if (!ISNULLSTR(appDelegate.data.linkConfig)) { -// NSError *jsonError; -// id linkConfigResponse = [NSJSONSerialization JSONObjectWithData:[appDelegate.data.linkConfig dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&jsonError]; -// if (jsonError==nil && [linkConfigResponse isKindOfClass:[NSArray class]]) { -// NSArray *linkConfigArray = linkConfigResponse; -// height = height + linkConfigArray.count*70; -// for (NSDictionary *dic in linkConfigArray) { -// LinkConfig *linkModel = [LinkConfig modelWithDictionary:dic]; -// [menuArray addObject:linkModel]; -// } -// } -// } + if (!ISNULLSTR(appDelegate.data.linkConfig)) { + NSError *jsonError; + id linkConfigResponse = [NSJSONSerialization JSONObjectWithData:[appDelegate.data.linkConfig dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:&jsonError]; + if (jsonError==nil && [linkConfigResponse isKindOfClass:[NSArray class]]) { + NSArray *linkConfigArray = linkConfigResponse; + height = height + linkConfigArray.count*70; + for (NSDictionary *dic in linkConfigArray) { + LinkConfig *linkModel = [LinkConfig modelWithDictionary:dic]; + [menuArray addObject:linkModel]; + } + } + } // 客服平台 if (!ISNULLSTR(appDelegate.data.fbUrl)) { height = height + 70; @@ -163,11 +178,23 @@ self.mainURLString = link.linkUrl; self.isPresent = NO; [self intoMainWebView]; + self.subBgView.hidden = YES; + NSArray *dataArr = [self.subBgView subviews]; + for (UIView *subView in dataArr) { + [subView removeFromSuperview]; + } } }else{ self.mainURLString = link.linkUrl; self.isPresent = NO; [self intoMainWebView]; + + self.subBgView.hidden = YES; + NSArray *dataArr = [self.subBgView subviews]; + for (UIView *subView in dataArr) { + [subView removeFromSuperview]; + } + } }else if ([webMenuType isKindOfClass:[NSNumber class]]) { NSNumber *number = webMenuType; @@ -178,6 +205,12 @@ }else if (menuType == DSWebMenuRefreshType) { self.isPresent = NO; [self intoMainWebView]; + + self.subBgView.hidden = YES; + NSArray *dataArr = [self.subBgView subviews]; + for (UIView *subView in dataArr) { + [subView removeFromSuperview]; + } }else if (menuType == DSWebMenuWhatsAppType) { if (!ISNULLSTR(appDelegate.data.wsUrl)) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",appDelegate.data.wsUrl]] options:@{UIApplicationOpenURLOptionUniversalLinksOnly:@NO} completionHandler:^(BOOL success) {}]; @@ -219,13 +252,23 @@ decisionHandler(WKNavigationActionPolicyAllow); } -- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures -{ - if (navigationAction.request.URL) { +- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures { + NSString *urlStr = navigationAction.request.URL.absoluteString; + if (urlStr.length == 0) { + self.subBgView.hidden = NO; + CGRect frame = self.view.bounds; + WKWebView *newWebView = [[WKWebView alloc] initWithFrame:frame configuration:configuration]; + newWebView.UIDelegate = self; + newWebView.navigationDelegate = self; + [self.subBgView addSubview:newWebView]; + + return newWebView; + }else if (navigationAction.request.URL) { UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; MainOldViewController *view = [sb instantiateViewControllerWithIdentifier:@"MainOldViewController"]; // MainOldViewController *view = [[MainOldViewController alloc] init]; - view.gameURLString = navigationAction.request.URL.absoluteString; + + view.gameURLString = urlStr; view.isPresent = YES; view.modalPresentationStyle = UIModalPresentationFullScreen; [self presentViewController:view animated:YES completion:^{}]; diff --git a/ShenQi/WMDragView/DSWebDragView.m b/ShenQi/WMDragView/DSWebDragView.m index 5f7618b..3c8534a 100644 --- a/ShenQi/WMDragView/DSWebDragView.m +++ b/ShenQi/WMDragView/DSWebDragView.m @@ -16,7 +16,7 @@ self.backgroundColor = [UIColor clearColor]; self.homeImageView = [[UIImageView alloc] initWithFrame:self.bounds]; - self.homeImageView.image = [UIImage imageNamed:@"menu"]; + self.homeImageView.image = [UIImage imageNamed:@"menu2"]; self.homeImageView.backgroundColor = [UIColor whiteColor]; self.homeImageView.layer.cornerRadius = 30.f; self.homeImageView.layer.masksToBounds = YES; @@ -31,7 +31,7 @@ self.backgroundColor = [UIColor clearColor]; self.homeImageView = [[UIImageView alloc] initWithFrame:self.bounds]; - self.homeImageView.image = [UIImage imageNamed:@"menu"]; + self.homeImageView.image = [UIImage imageNamed:@"menu2"]; self.homeImageView.backgroundColor = [UIColor whiteColor]; self.homeImageView.layer.cornerRadius = 30.f; self.homeImageView.layer.masksToBounds = YES; diff --git a/ShenQi/WMDragView/DSWebMenuCollectionView.m b/ShenQi/WMDragView/DSWebMenuCollectionView.m index 6681073..5bc8298 100644 --- a/ShenQi/WMDragView/DSWebMenuCollectionView.m +++ b/ShenQi/WMDragView/DSWebMenuCollectionView.m @@ -81,25 +81,26 @@ static NSString *identifier = @"AvatarCollectionViewCell"; if (ISNULLSTR(link.icon)) { cell.avatarImageView.image = [self circularImageWithText:link.name]; }else{ - NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithURL:[NSURL URLWithString:link.icon] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (error) { - NSLog(@"Error downloading image: %@", error); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - UIImage *image = [UIImage imageWithData:data]; - cell.avatarImageView.image = image; - }); - } - }]; - [dataTask resume]; + cell.avatarImageView.image = [UIImage imageNamed:link.icon]; +// NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithURL:[NSURL URLWithString:link.icon] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { +// if (error) { +// NSLog(@"Error downloading image: %@", error); +// } else { +// dispatch_async(dispatch_get_main_queue(), ^{ +// UIImage *image = [UIImage imageWithData:data]; +// cell.avatarImageView.image = image; +// }); +// } +// }]; +// [dataTask resume]; } }else if ([value isKindOfClass:[NSNumber class]]) { NSNumber *number = value; DSWebMenuType type = number.integerValue; if (type == DSWebMenuHomeType) { - cell.avatarImageView.image = [UIImage imageNamed:@"menu"]; + cell.avatarImageView.image = [UIImage imageNamed:@"menu2"]; }else if (type == DSWebMenuRefreshType) { - cell.avatarImageView.image = [UIImage imageNamed:@"refresh"]; + cell.avatarImageView.image = [UIImage imageNamed:@"refresh2"]; }else if (type == DSWebMenuTelegramType) { cell.avatarImageView.image = [UIImage imageNamed:@"telegram"]; }else if (type == DSWebMenuWhatsAppType) { @@ -107,10 +108,10 @@ static NSString *identifier = @"AvatarCollectionViewCell"; }else if (type == DSWebMenuFacebookType) { cell.avatarImageView.image = [UIImage imageNamed:@"facebook"]; }else if (type == DSWebMenuNotiType) { - cell.avatarImageView.image = [UIImage imageNamed:@"noti"]; - cell.imgWidth.constant = 40; - cell.avatarImageView.layer.cornerRadius = 20.f; - cell.avatarImageView.layer.masksToBounds = YES; + cell.avatarImageView.image = [UIImage imageNamed:@"noti2"]; +// cell.imgWidth.constant = 40; +// cell.avatarImageView.layer.cornerRadius = 20.f; +// cell.avatarImageView.layer.masksToBounds = YES; } } cell.avatarImageView.contentMode = UIViewContentModeScaleAspectFit; @@ -127,7 +128,7 @@ static NSString *identifier = @"AvatarCollectionViewCell"; - (UIImage *)circularImageWithText:(NSString *)text { // 设置字体和大小 - UIFont *font = [UIFont systemFontOfSize:16.0f]; + UIFont *font = [UIFont boldSystemFontOfSize:15.0f]; CGSize textSize = [text sizeWithFont:font]; // 创建图形上下文 @@ -141,11 +142,11 @@ static NSString *identifier = @"AvatarCollectionViewCell"; CGContextClip(context); // 设置背景颜色(可选) - CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); // 白色背景 + CGContextSetRGBFillColor(context, 228.0/255.0, 171.0/255.0, 95.0/255.0, 1.0); // 白色背景 CGContextFillRect(context, rect); // 设置文本颜色 - [[UIColor redColor] set]; + [[UIColor blackColor] set]; // 计算文本绘制位置,使其居中 CGFloat x = (size - textSize.width) / 2.0f;