Skip to content

Commit

Permalink
1. Add LICENSE 2. Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Nov 30, 2015
1 parent 86630d3 commit 8ada9f6
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 2 deletions.
17 changes: 17 additions & 0 deletions LCBannerView.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Pod::Spec.new do |s|

s.name = "LCBannerView"
s.version = "1.0.0"
s.summary = "A simple progress HUD. Support: http://www.leodong.com"
s.homepage = "https://github.com/LeoiOS/LCBannerView"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Leo" => "leoios@sina.com" }
s.social_media_url = "http://www.leodong.com"
s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/LeoiOS/LCBannerView.git", :tag => s.version }
s.source_files = "LCBannerView/*"
s.requires_arc = true

s.dependency "SDWebImage"

end
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2015 Leo (http://www.leodong.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
# LCBannerView
A very popular and highly customized banner view!

🔥A very popular and highly customized banner view!

````
心有猛虎,细嗅蔷薇。
````



## Introduction

This is a display of advertising or information. If you feel good, please give me a star⭐️.
You can using the images from **local** or **internet**.



## Installation

LCBannerView is available on [CocoaPods](https://cocoapods.org/). Just add the following to your project Podfile:
````ruby
pod "LCBannerView" # Podfile
````



## Non-CocoaPods Installation

Just drag the LCBannerView folder into your project.



## Usage
Expand All @@ -22,8 +36,9 @@ pod "LCBannerView" # Podfile
````objc
#import "LCBannerView"
````
* demo code:
* Demo code:
````objc
// 1. from internet
[scrollView addSubview:({

LCBannerView *bannerView = [LCBannerView bannerViewWithFrame:CGRectMake(0, 300.0f, [UIScreen mainScreen].bounds.size.width, 200.0f)
Expand All @@ -35,4 +50,34 @@ pod "LCBannerView" # Podfile
pageIndicatorTintColor:[UIColor whiteColor]];
bannerView;
})];

// 2. from local
// please find out from the demo.
````
* Delegate (`@optional`):
````objc
- (void)bannerView:(LCBannerView *)bannerView didClickedImageIndex:(NSInteger)index;
````
For example:
````objc
- (void)bannerView:(LCBannerView *)bannerView didClickedImageIndex:(NSInteger)index {

NSLog(@"you clicked image in %@ at index: %ld", bannerView, (long)index);
}

// logs
2015-11-30 17:36:20.611 LCBannerViewDemo[6075:456257] you clicked image in <LCBannerView: 0x7fc98b751ff0; frame = (0 300; 375 200); layer = <CALayer: 0x7fc98b7521b0>> at index: 1
2015-11-30 17:36:21.292 LCBannerViewDemo[6075:456257] you clicked image in <LCBannerView: 0x7fc98b433190; frame = (0 20; 375 200); layer = <CALayer: 0x7fc98b42ce20>> at index: 1
2015-11-30 17:36:21.801 LCBannerViewDemo[6075:456257] you clicked image in <LCBannerView: 0x7fc98b751ff0; frame = (0 300; 375 200); layer = <CALayer: 0x7fc98b7521b0>> at index: 1
2015-11-30 17:36:22.380 LCBannerViewDemo[6075:456257] you clicked image in <LCBannerView: 0x7fc98b433190; frame = (0 20; 375 200); layer = <CALayer: 0x7fc98b42ce20>> at index: 1
````

## Support
* If you have some questions, please commit a issure! Thx!
* Email: leoios@sina.com
* Blog: http://www.leodong.com


### License
[MIT license](http://opensource.org/licenses/MIT)

0 comments on commit 8ada9f6

Please sign in to comment.