cleaning project

This commit is contained in:
Yannick Loriot 2015-11-11 14:32:30 +01:00
parent 38d646b322
commit 2d2180e4ca
4 changed files with 10 additions and 8 deletions

View File

@ -30,12 +30,12 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oPm-IJ-VdU" customClass="Splitflap" customModule="SplitflapExample" customModuleProvider="target">
<rect key="frame" x="130" y="260" width="340" height="80"/>
<rect key="frame" x="150" y="270" width="300" height="60"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="xt3-Re-3pf"/>
<constraint firstAttribute="width" constant="340" id="zRn-bY-PT6"/>
<constraint firstAttribute="height" constant="60" id="xt3-Re-3pf"/>
<constraint firstAttribute="width" constant="300" id="zRn-bY-PT6"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="flapSpacing">

View File

@ -12,7 +12,7 @@ class ViewController: UIViewController, SplitflapDataSource, SplitflapDelegate {
@IBOutlet weak var splitflap: Splitflap!
@IBOutlet weak var actionButton: UIButton!
private let words = ["Hey you", "Bonsoir", "12h15", "Arrival"]
private let words = ["Hello", "Hey you", "Bonsoir", "12h15", "Arrival"]
private var currentIndex = 0
override func viewDidLoad() {
@ -26,7 +26,7 @@ class ViewController: UIViewController, SplitflapDataSource, SplitflapDelegate {
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
updateSplitFlapAction(actionButton)
//updateSplitFlapAction(actionButton)
}
// MARK: - Action Methods
@ -46,7 +46,7 @@ class ViewController: UIViewController, SplitflapDataSource, SplitflapDelegate {
// MARK: - Splitflap DataSource Methods
func numberOfFlapsInSplitflap(splitflap: Splitflap) -> Int {
return 7
return 5
}
func supportedTokensInSplitflap(splitflap: Splitflap) -> [String] {

View File

@ -6,7 +6,9 @@ Splitflap is a simple to use component to present changeable alphanumeric text l
## Usage
Here is the simplest way to use the `Splitflap` component:
The first example is the simplest way to use the `Splitflap` component. Here how to display this "Hello" text:
![Hello](http://yannickloriot.com/resources/splitflap-hello.gif)
```swift
import Splitflap

View File

@ -121,7 +121,7 @@ final class Tile: UIView {
else {
digitLabelFrame.size.height = digitLabelFrame.height * 2
digitLabelFrame.origin.y = -digitLabelFrame.height / 2
mainLineViewFrame = CGRectMake(0, -2, bounds.width, 4)
mainLineViewFrame = CGRectMake(0, -2, bounds.width, 3)
secondaryLineViewFrame = CGRectMake(0, -2, bounds.width, 2)
}