forked from CoderMJLee/MJRefresh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.本地化兼容pod 1.x和0.x的 2.箭头图片颜色跟随文字颜色
- Loading branch information
MJ Lee
authored and
MJ Lee
committed
Jun 13, 2016
1 parent
51ff848
commit b28ed99
Showing
8 changed files
with
105 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// NSBundle+MJRefresh.h | ||
// MJRefreshExample | ||
// | ||
// Created by MJ Lee on 16/6/13. | ||
// Copyright © 2016年 小码哥. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSBundle (MJRefresh) | ||
+ (instancetype)mj_refreshBundle; | ||
+ (UIImage *)mj_arrowImage; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// NSBundle+MJRefresh.m | ||
// MJRefreshExample | ||
// | ||
// Created by MJ Lee on 16/6/13. | ||
// Copyright © 2016年 小码哥. All rights reserved. | ||
// | ||
|
||
#import "NSBundle+MJRefresh.h" | ||
#import "MJRefreshComponent.h" | ||
|
||
@implementation NSBundle (MJRefresh) | ||
+ (instancetype)mj_refreshBundle | ||
{ | ||
static NSBundle *refreshBundle = nil; | ||
if (refreshBundle == nil) { | ||
// 这里不使用mainBundle是为了适配pod 1.x和0.x | ||
refreshBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[MJRefreshComponent class]] pathForResource:@"MJRefresh" ofType:@"bundle"]]; | ||
} | ||
return refreshBundle; | ||
} | ||
|
||
+ (UIImage *)mj_arrowImage | ||
{ | ||
static UIImage *arrowImage = nil; | ||
if (arrowImage == nil) { | ||
arrowImage = [[UIImage imageWithContentsOfFile:[[self mj_refreshBundle] pathForResource:@"arrow@2x" ofType:@"png"]] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; | ||
} | ||
return arrowImage; | ||
} | ||
@end |
Oops, something went wrong.