Skip to content

Commit

Permalink
Update to version 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lm2343635 committed Jan 13, 2017
1 parent 2e694f5 commit d460525
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A simple UIImageView category with some extension functions.
- Support Interface Builder.
- Set border radius for image view.
- Set shadow for image view.
- Rotate image view.

# Installation

Expand All @@ -29,10 +30,18 @@ pod 'UIImageView+Extension', '~> 0.2'

- If you want to control your image view in your program, you should import the category header: `#import "UIImageView+Extension.h"` to your `.h` or `.m` file.

# API Document
### Corner Radius

```objective-c
// Set corner radius.
[_imageView setImageCornerRadius:5.0];
```
### Shadow
The method `setShadowWithColor:shadowXOffset:shadowYOffset:shadowRadius:`should be invoked before you invoke methods including `changeShadowColor:color`, `changeShadowXOffset:xOffset`, `changeShadowYOffset:yOffset` and `changeShadowRadius:radius`.
```objective-c
// Init a shadow with color, offset and raduis.
[_imageView setShadowWithColor:[UIColor darkGrayColor]
shadowXOffset:0
Expand All @@ -46,14 +55,26 @@ pod 'UIImageView+Extension', '~> 0.2'
[_imageView changeShadowYOffset:1.0];
```

- The method `setShadowWithColor:shadowXOffset:shadowYOffset:shadowRadius:`should be invoked before you invoke methods including `changeShadowColor:color`, `changeShadowXOffset:xOffset`, `changeShadowYOffset:yOffset` and `changeShadowRadius:radius`.
### Rotate
You can rotate a image view infinitely by the method `startRotate:withClockwise:`, the first parameter is rotation time per 1 round, the second parameter decides this rotation is clockwise or anticlockwise.

```objective-c
// Init a shadow with color, offset and raduis.
[_imageView startRotate:2 withClockwise:NO];

// Change shadow color, offset and radius.
[_imageView stopRotate];
```
# Demo App
A demo project contained in this repository shows how to use it from a storyboard.
A demo project contained in this repository shows how to use UIImageView+Extension from a storyboard.
![Demo App](https://github.com/raw/lm2343635/UIImageView-Extension/master/Screenshoots/DemoApp.png)
# Change log
* version 0.2.1
* Rotate image view infinitely.
* version 0.2.0
* Support Interface Builder.
* Support changing shadow style.
Expand Down
Binary file modified Screenshoots/DemoApp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions UIImageView+Extension.podspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Pod::Spec.new do |s|
s.name = "UIImageView+Extension"
s.version = "0.2.0"
s.version = "0.2.1"
s.summary = "A simple UIImageView category with some extension functions."

s.description = <<-DESC
# Features
- Supports Interface Builder.
- Set border radius for image view.
- Set shadow for image view.
- Set border radius for image view.
- Set shadow for image view.
- Rotate image view.
DESC

s.homepage = "https://github.com/lm2343635/UIImageView-Extension"
Expand All @@ -16,7 +17,7 @@ Pod::Spec.new do |s|
s.social_media_url = "http://fczm.pw"

s.platform = :ios
s.source = { :git => "https://github.com/lm2343635/UIImageView-Extension.git", :tag => "0.2.0" }
s.source = { :git => "https://github.com/lm2343635/UIImageView-Extension.git", :tag => "0.2.1" }

s.source_files = "UIImageView+Extension/**/*.{h,m}"

Expand Down

0 comments on commit d460525

Please sign in to comment.