Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMBase
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMBase
Commits
876d9bb9
Commit
876d9bb9
authored
Sep 06, 2019
by
艾娇平
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ajp-7.15.0' into 'master'
添加SDWebImage依赖 See merge request
!15
parents
dbce5ee6
c4fb3dd6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
GMBase.podspec
GMBase.podspec
+1
-0
GMBaseUtil.h
GMBase/Classes/GMBaseUtil.h
+1
-0
OCNavigationBar.m
GMBase/Classes/OCNavigationBar.m
+6
-4
No files found.
GMBase.podspec
View file @
876d9bb9
...
@@ -17,4 +17,5 @@ Pod::Spec.new do |s|
...
@@ -17,4 +17,5 @@ Pod::Spec.new do |s|
s
.
dependency
'
GMPhobos
'
s
.
dependency
'
GMPhobos
'
s
.
dependency
'
GMHud
'
s
.
dependency
'
GMHud
'
s
.
dependency
'
GMKit
'
s
.
dependency
'
GMKit
'
s
.
dependency
'
SDWebImage
'
end
end
GMBase/Classes/GMBaseUtil.h
View file @
876d9bb9
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import <Masonry/Masonry.h>
#import <Masonry/Masonry.h>
@interface
GMJailbreak
:
NSObject
@interface
GMJailbreak
:
NSObject
+
(
BOOL
)
isJailbreak
;
+
(
BOOL
)
isJailbreak
;
@end
@end
...
...
GMBase/Classes/OCNavigationBar.m
View file @
876d9bb9
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#import <Masonry/Masonry.h>
#import <Masonry/Masonry.h>
#import "GMBaseUtil.h"
#import "GMBaseUtil.h"
@import
GMKit
;
@import
GMKit
;
@import
SDWebImage
;
@interface
OCNavigationBarButton
()
@interface
OCNavigationBarButton
()
@property
(
nonatomic
,
assign
)
CGFloat
adaptiveWidth
;
@property
(
nonatomic
,
assign
)
CGFloat
adaptiveWidth
;
...
@@ -209,7 +210,8 @@
...
@@ -209,7 +210,8 @@
-
(
void
)
setNearRightIconURL
:
(
NSString
*
)
nearRightIconURL
{
-
(
void
)
setNearRightIconURL
:
(
NSString
*
)
nearRightIconURL
{
_nearRightIconURL
=
nearRightIconURL
;
_nearRightIconURL
=
nearRightIconURL
;
_nearRightButton
.
hidden
=
NO
;
_nearRightButton
.
hidden
=
NO
;
[[
SDWebImageManager
sharedManager
]
downloadImageWithURL
:[
NSURL
URLWithString
:
_nearRightIconURL
]
options
:
0
progress
:
nil
completed
:^
(
UIImage
*
image
,
NSError
*
error
,
SDImageCacheType
cacheType
,
BOOL
finished
,
NSURL
*
imageURL
)
{
[[
SDWebImageDownloader
sharedDownloader
]
downloadImageWithURL
:[
NSURL
URLWithString
:
_nearRightIconURL
]
completed
:
^
(
UIImage
*
_Nullable
image
,
NSData
*
_Nullable
data
,
NSError
*
_Nullable
error
,
BOOL
finished
)
{
if
(
image
)
{
if
(
image
)
{
UIImage
*
scaledImage
=
[
image
resizeToDeviceScale
];
UIImage
*
scaledImage
=
[
image
resizeToDeviceScale
];
[
_nearRightButton
setImage
:
scaledImage
forState
:
UIControlStateNormal
];
[
_nearRightButton
setImage
:
scaledImage
forState
:
UIControlStateNormal
];
...
@@ -221,14 +223,14 @@
...
@@ -221,14 +223,14 @@
-
(
void
)
setRightIconURL
:
(
NSString
*
)
rightIconURL
{
-
(
void
)
setRightIconURL
:
(
NSString
*
)
rightIconURL
{
_rightIconURL
=
rightIconURL
;
_rightIconURL
=
rightIconURL
;
_rightButton
.
hidden
=
NO
;
_rightButton
.
hidden
=
NO
;
[[
SDWebImage
Manager
sharedManager
]
downloadImageWithURL
:[
NSURL
URLWithString
:
rightIconURL
]
options
:
0
progress
:
nil
completed
:^
(
UIImage
*
image
,
NSError
*
error
,
SDImageCacheType
cacheType
,
BOOL
finished
,
NSURL
*
imageURL
)
{
[[
SDWebImage
Downloader
sharedDownloader
]
downloadImageWithURL
:[
NSURL
URLWithString
:
rightIconURL
]
completed
:
^
(
UIImage
*
_Nullable
image
,
NSData
*
_Nullable
data
,
NSError
*
_Nullable
error
,
BOOL
finished
)
{
if
(
image
)
{
if
(
image
)
{
UIImage
*
scaledImage
=
[
image
resizeToDeviceScale
];
UIImage
*
scaledImage
=
[
image
resizeToDeviceScale
];
[
_rightButton
setImage
:
scaledImage
forState
:
UIControlStateNormal
];
[
_rightButton
setImage
:
scaledImage
forState
:
UIControlStateNormal
];
}
}
}];
}];
[
self
layoutTitle
];
[
self
layoutTitle
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment