Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinhope committed May 26, 2017
1 parent fa24aae commit 3b87e30
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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] = ...
Expand All @@ -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 = ...
Expand All @@ -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
Expand Down

0 comments on commit 3b87e30

Please sign in to comment.