From 408c06116c1ec15aa44bb8da1ef3f730f9d699d8 Mon Sep 17 00:00:00 2001 From: Lucas Farah Date: Sat, 2 Jul 2016 18:13:21 -0300 Subject: [PATCH] Fixed Readme Inspired by the [iOS-readme-template](https://github.com/awesome-labs/iOS-readme-template) --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 11b3361..36b94a1 100644 --- a/README.md +++ b/README.md @@ -5,35 +5,35 @@ LLSwitch This is a funny switch for iOS
一个有趣的switch -Thank [Dribbble](https://dribbble.com/shots/2706143-Dribbble-Debut-Boring-Funny-Slider-Animation) for providing inspiration +Thanks [Dribbble](https://dribbble.com/shots/2706143-Dribbble-Debut-Boring-Funny-Slider-Animation) for providing inspiration ----------- - - -Preview 预览 -------------- ![LLSwitchDemo](https://github.com/lilei644/LLSwitch/blob/master/Preview/LLSwitchDemo.gif) ## Installation  安装 -* pod -``` -1.pod "LLSwitch" -2.pod install // 若获取失败请重新 pod setup -3.#import "LLSwitch.h" -``` -* Common -``` -1.Add "LLSwitch" files to your Project // 直接导入“LLSwitch”文件夹到项目中 -2.#import "LLSwitch.h" + +#### CocoaPods +You can use [CocoaPods](http://cocoapods.org/) to install `LLSwitch` by adding it to your `Podfile`: + +```ruby +platform :ios, '8.0' +use_frameworks! +pod 'LLSwitch' ``` +To get the full benefits import `LLSwitch` wherever you import UIKit + +#### Manually +1. Download and drop ```/LLSwitch```folder in your project. +2. Congratulations! ## Usage  用法 -* Init  初始化 + +#### Initialization  初始化 ``` LLSwitch *llSwitch = [[LLSwitch alloc] initWithFrame:CGRectMake(100, 100, 120, 60)]; [self.view addSubview:llSwitch]; ``` -* Reset Base Property  重设基本属性 + +#### Reset Base Property  重设基本属性 ``` llSwitch.onColor = [UIColor blueColor]; // switch is open color 开关打开的颜色 llSwitch.offColor = [UIColor grayColor]; // switch is close color 开关关闭的颜色 @@ -41,7 +41,7 @@ llSwitch.faceColor = [UIColor whiteColor]; // switch face color 圆脸的 llSwitch.animationDuration = 1.2f; // switch open or close animation time 开关的动画时间 ``` -* delegate  代理监听 +#### delegate  代理监听 ``` llSwitch.delegate = self; @@ -58,7 +58,7 @@ NSLog(@"stop"); NSLog(@"stop --- on:%hhd", on); } ``` -* support xib and storyboard 支持xib和storyboard +#### support xib and storyboard 支持xib和storyboard ![LLSwitchForXib](https://github.com/lilei644/LLSwitch/blob/master/Preview/LLSwitchForXib.png) ## Requirements  版本要求