Commit 9c75bccf authored by 曹逢阳's avatar 曹逢阳

update

parent 5034621c
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
*.DS_Store
*.cer
*.mobileprovision
.DS_Store
*.ipa
UntrackDebugDomains.h
#*GMLocalServerDomains.h
#*GMLocalServerDomains.m
# CocoaPods
Pods/
Gengmei/.DS_Store
Gengmei/.idea/
Gengmei/Gengmei.app.dSYM.zip
#Gemfile
#Gemfile.lock
Gengmei/fastlane/archive
*.dSYM.zip
Gengmei/fastlane/report.xml
report.xml
fastlane/report.xml
fastlane/archive
WorkspaceSettings.xcsettings
...@@ -179,7 +179,7 @@ EXTERNAL SOURCES: ...@@ -179,7 +179,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMAILab: 35f544e87ecde9ce08be2609e4f4fa0be405a8b5 GMAILab: 1b28ba3f10a7e4d430153127c4397888c0febef6
GMBase: 2b77f591a35a589ed331c490af093b68b0fc73be GMBase: 2b77f591a35a589ed331c490af093b68b0fc73be
GMCache: b78d8e46db864405e91d226ce640cc80d966c611 GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMediator: 0b222275ef14deaf72eca107e76e048b67172c2c GMediator: 0b222275ef14deaf72eca107e76e048b67172c2c
......
No preview for this file type
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
"platforms": { "platforms": {
"ios": "9.0" "ios": "9.0"
}, },
"source_files": "GMAILab/Classes/*.{h,m}",
"resource_bundles": { "resource_bundles": {
"GMAILab": [ "GMAILab": [
"GMAILab/Assets/*.{png,xib}" "GMAILab/Assets/*.{png,xib}"
......
...@@ -179,7 +179,7 @@ EXTERNAL SOURCES: ...@@ -179,7 +179,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMAILab: 35f544e87ecde9ce08be2609e4f4fa0be405a8b5 GMAILab: 1b28ba3f10a7e4d430153127c4397888c0febef6
GMBase: 2b77f591a35a589ed331c490af093b68b0fc73be GMBase: 2b77f591a35a589ed331c490af093b68b0fc73be
GMCache: b78d8e46db864405e91d226ce640cc80d966c611 GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMediator: 0b222275ef14deaf72eca107e76e048b67172c2c GMediator: 0b222275ef14deaf72eca107e76e048b67172c2c
......
This diff is collapsed.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#import "GMAIChannelViewController.h" #import "GMAIChannelViewController.h"
#import "GMAICardModel.h" #import "GMAICardModel.h"
#import "NSBundle+GMAILab.h" #import "NSBundle+GMAILab.h"
#import "UIImage+GMAILab.h"
#import "GMAICardCollectionCell.h" #import "GMAICardCollectionCell.h"
#import "GMVerticalFlowLayout.h" #import "GMVerticalFlowLayout.h"
#import "GMAIChannelViewModel.h" #import "GMAIChannelViewModel.h"
......
...@@ -30,7 +30,7 @@ TODO: Add long description of the pod here. ...@@ -30,7 +30,7 @@ TODO: Add long description of the pod here.
s.ios.deployment_target = '9.0' s.ios.deployment_target = '9.0'
s.source_files = 'GMAILab/Classes/*.{h,m}' #s.source_files = 'GMAILab/Classes/*.{h,m}'
s.subspec 'Model' do |ss| s.subspec 'Model' do |ss|
ss.source_files = 'GMAILab/Classes/Model/*.{h,m}' ss.source_files = 'GMAILab/Classes/Model/*.{h,m}'
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
_collectionView.delegate = self; _collectionView.delegate = self;
[_collectionView registerCell:GMAICardCollectionCell.class]; [_collectionView registerCell:GMAICardCollectionCell.class];
NSBundle *bundle = [NSBundle gm_AILabBundle]; NSBundle *bundle = [NSBundle gm_AILabBundle:GMAICardCollectionCell.class];
UINib *nib = [UINib nibWithNibName:NSStringFromClass(GMAICardCollectionCell.class) bundle:bundle]; UINib *nib = [UINib nibWithNibName:NSStringFromClass(GMAICardCollectionCell.class) bundle:bundle];
[_collectionView registerNib:nib forCellWithReuseIdentifier:NSStringFromClass(GMAICardCollectionCell.class)]; [_collectionView registerNib:nib forCellWithReuseIdentifier:NSStringFromClass(GMAICardCollectionCell.class)];
} }
......
...@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface NSBundle (GMAILab) @interface NSBundle (GMAILab)
+ (instancetype)gm_AILabBundle; + (instancetype)gm_AILabBundle:(Class)className;
@end @end
......
...@@ -4,27 +4,25 @@ ...@@ -4,27 +4,25 @@
// //
// Created by cfy on 2020/4/30. // Created by cfy on 2020/4/30.
// //
#import "NSBundle+GMAILab.h" #import "NSBundle+GMAILab.h"
#import "GMVerticalFlowLayout.h"
@implementation NSBundle (GMAILabBundle) @implementation NSBundle (GMAILabBundle)
+ (instancetype)gm_AILabBundle { + (instancetype)gm_AILabBundle:(Class)className {
static NSBundle *bundle = nil; static NSBundle *bundle = nil;
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
bundle = [NSBundle gm_AILabBundleBundle]; bundle = [NSBundle gm_AILabBundleBundle:className];
}); });
return bundle; return bundle;
} }
+ (NSBundle *)gm_AILabBundleBundle { + (NSBundle *)gm_AILabBundleBundle:(Class)className {
return [self bundleWithURL:[self gm_AILabBundleURL:GMVerticalFlowLayout.class]]; return [self bundleWithURL:[self gm_AILabBundleURL:className]];
} }
+ (NSURL *)gm_AILabBundleURL:(Class)class { + (NSURL *)gm_AILabBundleURL:(Class)className {
NSBundle *bundle = [NSBundle bundleForClass:class]; NSBundle *bundle = [NSBundle bundleForClass:className];
return [bundle URLForResource:@"GMAILab" withExtension:@"bundle"]; return [bundle URLForResource:@"GMAILab" withExtension:@"bundle"];
} }
......
//
// UIImage+GMAILab.h
// Pods
//
// Created by cfy on 2020/4/30.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIImage (GMAILab)
+ (UIImage *)gm_AILabBundleImageNamed:(NSString *)name bundleClass:(Class)bundleClass;
+ (UIImage *)gm_AILabImageNamed:(NSString *)name inBundle:(NSBundle *)bundle;
@end
NS_ASSUME_NONNULL_END
//
// UIImage+GMAILab.m
// Pods
//
// Created by cfy on 2020/4/30.
//
#import "UIImage+GMAILab.h"
#import "NSBundle+GMAILab.h"
@implementation UIImage (GMAILab)
+ (UIImage *)gm_AILabBundleImageNamed:(NSString *)name bundleClass:(Class)bundleClass {
return [self gm_AILabImageNamed:name inBundle:[NSBundle gm_AILabBundle:bundleClass]];
}
+ (UIImage *)gm_AILabImageNamed:(NSString *)name inBundle:(NSBundle *)bundle {
return [UIImage imageNamed:name inBundle:bundle compatibleWithTraitCollection:nil];
}
@end
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 to comment