[FIX] flap animation continue when new text is set #2
This commit is contained in:
parent
427356d014
commit
b75379d7de
|
@ -1,5 +1,8 @@
|
|||
language: objective-c
|
||||
osx_image: xcode7.1
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
env:
|
||||
matrix:
|
||||
- DESTINATION="OS=9.1,name=iPad 2"
|
||||
|
|
|
@ -159,10 +159,14 @@ final class FlapView: UIView {
|
|||
topAnim.duration = rotationDuration / 4 * 3
|
||||
bottomAnim.duration = rotationDuration / 4
|
||||
|
||||
let animating = targetToken != nil
|
||||
|
||||
targetToken = sanitizedToken
|
||||
targetCompletionBlock = completionBlock
|
||||
|
||||
displayNextToken()
|
||||
if !animating {
|
||||
displayNextToken()
|
||||
}
|
||||
}
|
||||
else {
|
||||
tokenGenerator.currentElement = sanitizedToken
|
||||
|
|
|
@ -47,7 +47,7 @@ import UIKit
|
|||
/**
|
||||
The delegate for the split-flap view.
|
||||
|
||||
The data source must adopt the SplitflapDelegate protocol and implement the
|
||||
The delegate must adopt the SplitflapDelegate protocol and implement the
|
||||
required methods to specify the flap rotation for example.
|
||||
*/
|
||||
public weak var delegate: SplitflapDelegate?
|
||||
|
|
|
@ -36,7 +36,7 @@ import Foundation
|
|||
*/
|
||||
public class SplitflapTokens {
|
||||
/// Numeric characters.
|
||||
public static let Numeric = "0123456789".characters.map { String($0) }
|
||||
public static let Numeric = (0 ... 9).map { String($0) }
|
||||
|
||||
/// Alphabetic characters (lower and upper cases).
|
||||
public static let Alphabetic = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".characters.map { String($0) }
|
||||
|
|
Loading…
Reference in New Issue