From 3b87e300c7ef784ab568b63de82c4550bef55d22 Mon Sep 17 00:00:00 2001 From: Xin Hong Date: Fri, 26 May 2017 16:46:16 +0800 Subject: [PATCH] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dd1b426..f6ed7c3 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -#SegmentedControl +# SegmentedControl SegmentedControl is a highly customizable segmented control for iOS applications. ![Example](Gif/SegmentedControlExample.gif "SegmentedControlExample") -##How To Get Started -###Carthage +## How To Get Started +### Carthage Specify "SegmentedControl" in your ```Cartfile```: ```ogdl github "teambition/SegmentedControl" ``` -###Usage -##### Text +### Usage +#### Text ```swift let titles: [NSAttributedString] = ... let selectedTitles: [NSAttributedString] = ... @@ -37,7 +37,7 @@ segmentedControl.selectionIndicatorHeight = 3 // default is 5 segmentedControl.selectionIndicatorEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) // default is UIEdgeInsets.zero ``` -##### Image +#### Image ```swift let images = ... let selectedImages = ... @@ -63,7 +63,7 @@ segmentedControl.selectionIndicatorHeight = 3 // default is 5 segmentedControl.selectionIndicatorEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) // default is UIEdgeInsets.zero ``` -##### Implement delegate +#### Implement delegate ```swift func segmentedControl(_ segmentedControl: SegmentedControl, didSelectIndex selectedIndex: Int) { // do something