Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
370b3b4b
Commit
370b3b4b
authored
Mar 14, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UIImage类目增加注释
parent
51ad6a36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
UIImage+Helper.h
XFFruit/General/Categories/UIImage+Helper.h
+25
-0
No files found.
XFFruit/General/Categories/UIImage+Helper.h
View file @
370b3b4b
...
...
@@ -26,7 +26,32 @@
+
(
UIImage
*
)
imageWithColor
:(
UIColor
*
)
color
andSize
:(
CGSize
)
size
;
+
(
UIImage
*
)
imageWithColor
:(
UIColor
*
)
color
andRect
:(
CGRect
)
rect
;
-
(
UIImage
*
)
greyScaleImage
;
/**
* 图片压缩到指定大小(具体看图片大小,过大的图片无法压缩到指定大小)
*
* @param kb 压缩后图片大小
*
* @return
*/
-
(
NSData
*
)
scaledToSpaceMaxSize
:(
NSInteger
)
kb
;
/**
* 压缩图片到指定高宽
*
* @param newSize 新的图片尺寸
*
* @return
*/
-
(
UIImage
*
)
scaledToSize
:(
CGSize
)
newSize
;
/**
* 按比例压缩图片至指定宽度
*
* @param newWidth 指定宽度
*
* @return
*/
-
(
UIImage
*
)
scaledToWidth
:(
NSInteger
)
newWidth
;
@end
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