├── .bundle
└── config
├── .gitignore
├── Capture
└── Capture.gif
├── Example
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
└── ViewController.swift
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── README.md
├── ShuffleTextLabel.podspec
├── ShuffleTextLabel.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── xcshareddata
│ └── xcschemes
│ ├── Example.xcscheme
│ └── ShuffleTextLabel.xcscheme
├── ShuffleTextLabel
├── Info.plist
├── ShuffleTextLabel.h
└── ShuffleTextLabel.swift
└── ShuffleTextLabelTests
├── Info.plist
└── ShuffleTextLabelTests.swift
/.bundle/config:
--------------------------------------------------------------------------------
1 | ---
2 | BUNDLE_PATH: bundler
3 | BUNDLE_DISABLE_SHARED_GEMS: '1'
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 |
20 | ## Other
21 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | ## Playgrounds
31 | timeline.xctimeline
32 | playground.xcworkspace
33 |
34 | # Swift Package Manager
35 | #
36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
37 | # Packages/
38 | .build/
39 |
40 | # Bundler
41 | #
42 | /bundler/
43 |
44 | # CocoaPods
45 | #
46 | # We recommend against adding the Pods directory to your .gitignore. However
47 | # you should judge for yourself, the pros and cons are mentioned at:
48 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
49 | #
50 | # Pods/
51 |
52 | # Carthage
53 | #
54 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
55 | # Carthage/Checkouts
56 |
57 | Carthage/Build
58 |
59 | # fastlane
60 | #
61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
62 | # screenshots whenever they are needed.
63 | # For more information about the recommended setup visit:
64 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
65 |
66 | fastlane/report.xml
67 | fastlane/screenshots
68 |
--------------------------------------------------------------------------------
/Capture/Capture.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chuganzy/ShuffleTextLabel/2234b7467014c25828eb94737ebf030f1b9318d4/Capture/Capture.gif
--------------------------------------------------------------------------------
/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Example
4 | //
5 | // Created by Takeru Chuganji on 2/7/16.
6 | // Copyright © 2016 Takeru Chuganji. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Example/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/Example/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Example/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Example
4 | //
5 | // Created by Takeru Chuganji on 2/7/16.
6 | // Copyright © 2016 Takeru Chuganji. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ShuffleTextLabel
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBOutlet private weak var label1: ShuffleTextLabel!
15 | @IBOutlet private weak var label2: ShuffleTextLabel!
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 | [self.label1, self.label2].forEach {
20 | $0.shuffleCharactors = "abcdefghijklmnopqrstuvwxyz".uppercaseString.characters
21 | }
22 | self.label1.shuffleInterval = 0.014
23 | self.label2.shuffleTextLength = 2
24 | self.label2.shuffleInterval = 0.008
25 | }
26 |
27 | override func viewDidAppear(animated: Bool) {
28 | super.viewDidAppear(animated)
29 | self.beginShuffleAnimation()
30 | }
31 |
32 | override func touchesBegan(touches: Set, withEvent event: UIEvent?) {
33 | super.touchesBegan(touches, withEvent: event)
34 | self.beginShuffleAnimation()
35 | }
36 |
37 | private func beginShuffleAnimation() {
38 | self.label1.beginShuffleText("SHUFFLETEXTLABEL")
39 | self.label2.beginShuffleText("CREATED BY HOPPENICHU / INSPIRED BY THA LTD")
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'cocoapods', '~> 0.39.0'
4 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | activesupport (4.2.5.1)
5 | i18n (~> 0.7)
6 | json (~> 1.7, >= 1.7.7)
7 | minitest (~> 5.1)
8 | thread_safe (~> 0.3, >= 0.3.4)
9 | tzinfo (~> 1.1)
10 | claide (0.9.1)
11 | cocoapods (0.39.0)
12 | activesupport (>= 4.0.2)
13 | claide (~> 0.9.1)
14 | cocoapods-core (= 0.39.0)
15 | cocoapods-downloader (~> 0.9.3)
16 | cocoapods-plugins (~> 0.4.2)
17 | cocoapods-search (~> 0.1.0)
18 | cocoapods-stats (~> 0.6.2)
19 | cocoapods-trunk (~> 0.6.4)
20 | cocoapods-try (~> 0.5.1)
21 | colored (~> 1.2)
22 | escape (~> 0.0.4)
23 | molinillo (~> 0.4.0)
24 | nap (~> 1.0)
25 | xcodeproj (~> 0.28.2)
26 | cocoapods-core (0.39.0)
27 | activesupport (>= 4.0.2)
28 | fuzzy_match (~> 2.0.4)
29 | nap (~> 1.0)
30 | cocoapods-downloader (0.9.3)
31 | cocoapods-plugins (0.4.2)
32 | nap
33 | cocoapods-search (0.1.0)
34 | cocoapods-stats (0.6.2)
35 | cocoapods-trunk (0.6.4)
36 | nap (>= 0.8, < 2.0)
37 | netrc (= 0.7.8)
38 | cocoapods-try (0.5.1)
39 | colored (1.2)
40 | escape (0.0.4)
41 | fuzzy_match (2.0.4)
42 | i18n (0.7.0)
43 | json (1.8.3)
44 | minitest (5.8.4)
45 | molinillo (0.4.2)
46 | nap (1.1.0)
47 | netrc (0.7.8)
48 | thread_safe (0.3.5)
49 | tzinfo (1.2.2)
50 | thread_safe (~> 0.1)
51 | xcodeproj (0.28.2)
52 | activesupport (>= 3)
53 | claide (~> 0.9.1)
54 | colored (~> 1.2)
55 |
56 | PLATFORMS
57 | ruby
58 |
59 | DEPENDENCIES
60 | cocoapods (~> 0.39.0)
61 |
62 | BUNDLED WITH
63 | 1.11.2
64 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Takeru Chuganji
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ShuffleTextLabel
2 |
3 | 
4 |
5 |
6 | ## Installation
7 |
8 | ### CocoaPods
9 |
10 | ```
11 | use_frameworks!
12 | pod 'ShuffleTextLabel'
13 | ```
14 |
15 | ### Carthage
16 |
17 | ```
18 | github "chuganzy/ShuffleTextLabel"
19 | ```
20 |
--------------------------------------------------------------------------------
/ShuffleTextLabel.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'ShuffleTextLabel'
3 | s.version = '0.0.2'
4 | s.source = { :git => 'https://github.com/hoppenichu/ShuffleTextLabel.git', :tag => s.version }
5 |
6 | s.summary = 'UILabel Shuffle Text Effect'
7 | s.homepage = 'https://github.com/hoppenichu/ShuffleTextLabel'
8 | s.license = { :type => 'MIT', :file => 'LICENSE' }
9 | s.author = { 'Takeru Chuganji' => 'takeru@hoppenichu.com' }
10 |
11 | s.ios.deployment_target = '8.0'
12 | s.requires_arc = true
13 | s.source_files = 'ShuffleTextLabel/*.swift'
14 | end
15 |
--------------------------------------------------------------------------------
/ShuffleTextLabel.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 004A686C1C675A93005AF72F /* ShuffleTextLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 004A686B1C675A93005AF72F /* ShuffleTextLabel.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 004A68731C675A93005AF72F /* ShuffleTextLabel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 004A68681C675A93005AF72F /* ShuffleTextLabel.framework */; };
12 | 004A68781C675A93005AF72F /* ShuffleTextLabelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004A68771C675A93005AF72F /* ShuffleTextLabelTests.swift */; };
13 | 004A68831C675AA2005AF72F /* ShuffleTextLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004A68821C675AA2005AF72F /* ShuffleTextLabel.swift */; };
14 | 004A688B1C675B0C005AF72F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004A688A1C675B0C005AF72F /* AppDelegate.swift */; };
15 | 004A688D1C675B0C005AF72F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004A688C1C675B0C005AF72F /* ViewController.swift */; };
16 | 004A68901C675B0C005AF72F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 004A688E1C675B0C005AF72F /* Main.storyboard */; };
17 | 004A68921C675B0C005AF72F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 004A68911C675B0C005AF72F /* Assets.xcassets */; };
18 | 004A68951C675B0C005AF72F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 004A68931C675B0C005AF72F /* LaunchScreen.storyboard */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | 004A68741C675A93005AF72F /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = 004A685F1C675A93005AF72F /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = 004A68671C675A93005AF72F;
27 | remoteInfo = ShuffleTextLabel;
28 | };
29 | 004A689A1C675B1D005AF72F /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = 004A685F1C675A93005AF72F /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = 004A68671C675A93005AF72F;
34 | remoteInfo = ShuffleTextLabel;
35 | };
36 | /* End PBXContainerItemProxy section */
37 |
38 | /* Begin PBXFileReference section */
39 | 004A68681C675A93005AF72F /* ShuffleTextLabel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ShuffleTextLabel.framework; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 004A686B1C675A93005AF72F /* ShuffleTextLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShuffleTextLabel.h; sourceTree = ""; };
41 | 004A686D1C675A93005AF72F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | 004A68721C675A93005AF72F /* ShuffleTextLabelTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ShuffleTextLabelTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 004A68771C675A93005AF72F /* ShuffleTextLabelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShuffleTextLabelTests.swift; sourceTree = ""; };
44 | 004A68791C675A93005AF72F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | 004A68821C675AA2005AF72F /* ShuffleTextLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShuffleTextLabel.swift; sourceTree = ""; };
46 | 004A68881C675B0C005AF72F /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
47 | 004A688A1C675B0C005AF72F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
48 | 004A688C1C675B0C005AF72F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
49 | 004A688F1C675B0C005AF72F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 004A68911C675B0C005AF72F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 004A68941C675B0C005AF72F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 004A68961C675B0C005AF72F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 004A68641C675A93005AF72F /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | 004A686F1C675A93005AF72F /* Frameworks */ = {
64 | isa = PBXFrameworksBuildPhase;
65 | buildActionMask = 2147483647;
66 | files = (
67 | 004A68731C675A93005AF72F /* ShuffleTextLabel.framework in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | 004A68851C675B0C005AF72F /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | );
76 | runOnlyForDeploymentPostprocessing = 0;
77 | };
78 | /* End PBXFrameworksBuildPhase section */
79 |
80 | /* Begin PBXGroup section */
81 | 004A685E1C675A93005AF72F = {
82 | isa = PBXGroup;
83 | children = (
84 | 004A686A1C675A93005AF72F /* ShuffleTextLabel */,
85 | 004A68761C675A93005AF72F /* ShuffleTextLabelTests */,
86 | 004A68891C675B0C005AF72F /* Example */,
87 | 004A68691C675A93005AF72F /* Products */,
88 | );
89 | sourceTree = "";
90 | };
91 | 004A68691C675A93005AF72F /* Products */ = {
92 | isa = PBXGroup;
93 | children = (
94 | 004A68681C675A93005AF72F /* ShuffleTextLabel.framework */,
95 | 004A68721C675A93005AF72F /* ShuffleTextLabelTests.xctest */,
96 | 004A68881C675B0C005AF72F /* Example.app */,
97 | );
98 | name = Products;
99 | sourceTree = "";
100 | };
101 | 004A686A1C675A93005AF72F /* ShuffleTextLabel */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 004A686B1C675A93005AF72F /* ShuffleTextLabel.h */,
105 | 004A68821C675AA2005AF72F /* ShuffleTextLabel.swift */,
106 | 004A686D1C675A93005AF72F /* Info.plist */,
107 | );
108 | path = ShuffleTextLabel;
109 | sourceTree = "";
110 | };
111 | 004A68761C675A93005AF72F /* ShuffleTextLabelTests */ = {
112 | isa = PBXGroup;
113 | children = (
114 | 004A68771C675A93005AF72F /* ShuffleTextLabelTests.swift */,
115 | 004A68791C675A93005AF72F /* Info.plist */,
116 | );
117 | path = ShuffleTextLabelTests;
118 | sourceTree = "";
119 | };
120 | 004A68891C675B0C005AF72F /* Example */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 004A688A1C675B0C005AF72F /* AppDelegate.swift */,
124 | 004A688C1C675B0C005AF72F /* ViewController.swift */,
125 | 004A688E1C675B0C005AF72F /* Main.storyboard */,
126 | 004A68911C675B0C005AF72F /* Assets.xcassets */,
127 | 004A68931C675B0C005AF72F /* LaunchScreen.storyboard */,
128 | 004A68961C675B0C005AF72F /* Info.plist */,
129 | );
130 | path = Example;
131 | sourceTree = "";
132 | };
133 | /* End PBXGroup section */
134 |
135 | /* Begin PBXHeadersBuildPhase section */
136 | 004A68651C675A93005AF72F /* Headers */ = {
137 | isa = PBXHeadersBuildPhase;
138 | buildActionMask = 2147483647;
139 | files = (
140 | 004A686C1C675A93005AF72F /* ShuffleTextLabel.h in Headers */,
141 | );
142 | runOnlyForDeploymentPostprocessing = 0;
143 | };
144 | /* End PBXHeadersBuildPhase section */
145 |
146 | /* Begin PBXNativeTarget section */
147 | 004A68671C675A93005AF72F /* ShuffleTextLabel */ = {
148 | isa = PBXNativeTarget;
149 | buildConfigurationList = 004A687C1C675A93005AF72F /* Build configuration list for PBXNativeTarget "ShuffleTextLabel" */;
150 | buildPhases = (
151 | 004A68631C675A93005AF72F /* Sources */,
152 | 004A68641C675A93005AF72F /* Frameworks */,
153 | 004A68651C675A93005AF72F /* Headers */,
154 | 004A68661C675A93005AF72F /* Resources */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | );
160 | name = ShuffleTextLabel;
161 | productName = ShuffleTextLabel;
162 | productReference = 004A68681C675A93005AF72F /* ShuffleTextLabel.framework */;
163 | productType = "com.apple.product-type.framework";
164 | };
165 | 004A68711C675A93005AF72F /* ShuffleTextLabelTests */ = {
166 | isa = PBXNativeTarget;
167 | buildConfigurationList = 004A687F1C675A93005AF72F /* Build configuration list for PBXNativeTarget "ShuffleTextLabelTests" */;
168 | buildPhases = (
169 | 004A686E1C675A93005AF72F /* Sources */,
170 | 004A686F1C675A93005AF72F /* Frameworks */,
171 | 004A68701C675A93005AF72F /* Resources */,
172 | );
173 | buildRules = (
174 | );
175 | dependencies = (
176 | 004A68751C675A93005AF72F /* PBXTargetDependency */,
177 | );
178 | name = ShuffleTextLabelTests;
179 | productName = ShuffleTextLabelTests;
180 | productReference = 004A68721C675A93005AF72F /* ShuffleTextLabelTests.xctest */;
181 | productType = "com.apple.product-type.bundle.unit-test";
182 | };
183 | 004A68871C675B0C005AF72F /* Example */ = {
184 | isa = PBXNativeTarget;
185 | buildConfigurationList = 004A68971C675B0C005AF72F /* Build configuration list for PBXNativeTarget "Example" */;
186 | buildPhases = (
187 | 004A68841C675B0C005AF72F /* Sources */,
188 | 004A68851C675B0C005AF72F /* Frameworks */,
189 | 004A68861C675B0C005AF72F /* Resources */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | 004A689B1C675B1D005AF72F /* PBXTargetDependency */,
195 | );
196 | name = Example;
197 | productName = Example;
198 | productReference = 004A68881C675B0C005AF72F /* Example.app */;
199 | productType = "com.apple.product-type.application";
200 | };
201 | /* End PBXNativeTarget section */
202 |
203 | /* Begin PBXProject section */
204 | 004A685F1C675A93005AF72F /* Project object */ = {
205 | isa = PBXProject;
206 | attributes = {
207 | LastSwiftUpdateCheck = 0720;
208 | LastUpgradeCheck = 0720;
209 | ORGANIZATIONNAME = "Takeru Chuganji";
210 | TargetAttributes = {
211 | 004A68671C675A93005AF72F = {
212 | CreatedOnToolsVersion = 7.2.1;
213 | };
214 | 004A68711C675A93005AF72F = {
215 | CreatedOnToolsVersion = 7.2.1;
216 | };
217 | 004A68871C675B0C005AF72F = {
218 | CreatedOnToolsVersion = 7.2.1;
219 | };
220 | };
221 | };
222 | buildConfigurationList = 004A68621C675A93005AF72F /* Build configuration list for PBXProject "ShuffleTextLabel" */;
223 | compatibilityVersion = "Xcode 3.2";
224 | developmentRegion = English;
225 | hasScannedForEncodings = 0;
226 | knownRegions = (
227 | en,
228 | Base,
229 | );
230 | mainGroup = 004A685E1C675A93005AF72F;
231 | productRefGroup = 004A68691C675A93005AF72F /* Products */;
232 | projectDirPath = "";
233 | projectRoot = "";
234 | targets = (
235 | 004A68671C675A93005AF72F /* ShuffleTextLabel */,
236 | 004A68871C675B0C005AF72F /* Example */,
237 | 004A68711C675A93005AF72F /* ShuffleTextLabelTests */,
238 | );
239 | };
240 | /* End PBXProject section */
241 |
242 | /* Begin PBXResourcesBuildPhase section */
243 | 004A68661C675A93005AF72F /* Resources */ = {
244 | isa = PBXResourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | 004A68701C675A93005AF72F /* Resources */ = {
251 | isa = PBXResourcesBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | );
255 | runOnlyForDeploymentPostprocessing = 0;
256 | };
257 | 004A68861C675B0C005AF72F /* Resources */ = {
258 | isa = PBXResourcesBuildPhase;
259 | buildActionMask = 2147483647;
260 | files = (
261 | 004A68951C675B0C005AF72F /* LaunchScreen.storyboard in Resources */,
262 | 004A68921C675B0C005AF72F /* Assets.xcassets in Resources */,
263 | 004A68901C675B0C005AF72F /* Main.storyboard in Resources */,
264 | );
265 | runOnlyForDeploymentPostprocessing = 0;
266 | };
267 | /* End PBXResourcesBuildPhase section */
268 |
269 | /* Begin PBXSourcesBuildPhase section */
270 | 004A68631C675A93005AF72F /* Sources */ = {
271 | isa = PBXSourcesBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | 004A68831C675AA2005AF72F /* ShuffleTextLabel.swift in Sources */,
275 | );
276 | runOnlyForDeploymentPostprocessing = 0;
277 | };
278 | 004A686E1C675A93005AF72F /* Sources */ = {
279 | isa = PBXSourcesBuildPhase;
280 | buildActionMask = 2147483647;
281 | files = (
282 | 004A68781C675A93005AF72F /* ShuffleTextLabelTests.swift in Sources */,
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | 004A68841C675B0C005AF72F /* Sources */ = {
287 | isa = PBXSourcesBuildPhase;
288 | buildActionMask = 2147483647;
289 | files = (
290 | 004A688D1C675B0C005AF72F /* ViewController.swift in Sources */,
291 | 004A688B1C675B0C005AF72F /* AppDelegate.swift in Sources */,
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | /* End PBXSourcesBuildPhase section */
296 |
297 | /* Begin PBXTargetDependency section */
298 | 004A68751C675A93005AF72F /* PBXTargetDependency */ = {
299 | isa = PBXTargetDependency;
300 | target = 004A68671C675A93005AF72F /* ShuffleTextLabel */;
301 | targetProxy = 004A68741C675A93005AF72F /* PBXContainerItemProxy */;
302 | };
303 | 004A689B1C675B1D005AF72F /* PBXTargetDependency */ = {
304 | isa = PBXTargetDependency;
305 | target = 004A68671C675A93005AF72F /* ShuffleTextLabel */;
306 | targetProxy = 004A689A1C675B1D005AF72F /* PBXContainerItemProxy */;
307 | };
308 | /* End PBXTargetDependency section */
309 |
310 | /* Begin PBXVariantGroup section */
311 | 004A688E1C675B0C005AF72F /* Main.storyboard */ = {
312 | isa = PBXVariantGroup;
313 | children = (
314 | 004A688F1C675B0C005AF72F /* Base */,
315 | );
316 | name = Main.storyboard;
317 | sourceTree = "";
318 | };
319 | 004A68931C675B0C005AF72F /* LaunchScreen.storyboard */ = {
320 | isa = PBXVariantGroup;
321 | children = (
322 | 004A68941C675B0C005AF72F /* Base */,
323 | );
324 | name = LaunchScreen.storyboard;
325 | sourceTree = "";
326 | };
327 | /* End PBXVariantGroup section */
328 |
329 | /* Begin XCBuildConfiguration section */
330 | 004A687A1C675A93005AF72F /* Debug */ = {
331 | isa = XCBuildConfiguration;
332 | buildSettings = {
333 | ALWAYS_SEARCH_USER_PATHS = NO;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BOOL_CONVERSION = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
341 | CLANG_WARN_EMPTY_BODY = YES;
342 | CLANG_WARN_ENUM_CONVERSION = YES;
343 | CLANG_WARN_INT_CONVERSION = YES;
344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
345 | CLANG_WARN_UNREACHABLE_CODE = YES;
346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
348 | COPY_PHASE_STRIP = NO;
349 | CURRENT_PROJECT_VERSION = 1;
350 | DEBUG_INFORMATION_FORMAT = dwarf;
351 | ENABLE_STRICT_OBJC_MSGSEND = YES;
352 | ENABLE_TESTABILITY = YES;
353 | GCC_C_LANGUAGE_STANDARD = gnu99;
354 | GCC_DYNAMIC_NO_PIC = NO;
355 | GCC_NO_COMMON_BLOCKS = YES;
356 | GCC_OPTIMIZATION_LEVEL = 0;
357 | GCC_PREPROCESSOR_DEFINITIONS = (
358 | "DEBUG=1",
359 | "$(inherited)",
360 | );
361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
363 | GCC_WARN_UNDECLARED_SELECTOR = YES;
364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
365 | GCC_WARN_UNUSED_FUNCTION = YES;
366 | GCC_WARN_UNUSED_VARIABLE = YES;
367 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
368 | MTL_ENABLE_DEBUG_INFO = YES;
369 | ONLY_ACTIVE_ARCH = YES;
370 | SDKROOT = iphoneos;
371 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
372 | TARGETED_DEVICE_FAMILY = "1,2";
373 | VERSIONING_SYSTEM = "apple-generic";
374 | VERSION_INFO_PREFIX = "";
375 | };
376 | name = Debug;
377 | };
378 | 004A687B1C675A93005AF72F /* Release */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | ALWAYS_SEARCH_USER_PATHS = NO;
382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
383 | CLANG_CXX_LIBRARY = "libc++";
384 | CLANG_ENABLE_MODULES = YES;
385 | CLANG_ENABLE_OBJC_ARC = YES;
386 | CLANG_WARN_BOOL_CONVERSION = YES;
387 | CLANG_WARN_CONSTANT_CONVERSION = YES;
388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
389 | CLANG_WARN_EMPTY_BODY = YES;
390 | CLANG_WARN_ENUM_CONVERSION = YES;
391 | CLANG_WARN_INT_CONVERSION = YES;
392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
393 | CLANG_WARN_UNREACHABLE_CODE = YES;
394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
395 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
396 | COPY_PHASE_STRIP = NO;
397 | CURRENT_PROJECT_VERSION = 1;
398 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
399 | ENABLE_NS_ASSERTIONS = NO;
400 | ENABLE_STRICT_OBJC_MSGSEND = YES;
401 | GCC_C_LANGUAGE_STANDARD = gnu99;
402 | GCC_NO_COMMON_BLOCKS = YES;
403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
405 | GCC_WARN_UNDECLARED_SELECTOR = YES;
406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
407 | GCC_WARN_UNUSED_FUNCTION = YES;
408 | GCC_WARN_UNUSED_VARIABLE = YES;
409 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
410 | MTL_ENABLE_DEBUG_INFO = NO;
411 | SDKROOT = iphoneos;
412 | TARGETED_DEVICE_FAMILY = "1,2";
413 | VALIDATE_PRODUCT = YES;
414 | VERSIONING_SYSTEM = "apple-generic";
415 | VERSION_INFO_PREFIX = "";
416 | };
417 | name = Release;
418 | };
419 | 004A687D1C675A93005AF72F /* Debug */ = {
420 | isa = XCBuildConfiguration;
421 | buildSettings = {
422 | CLANG_ENABLE_MODULES = YES;
423 | DEFINES_MODULE = YES;
424 | DYLIB_COMPATIBILITY_VERSION = 1;
425 | DYLIB_CURRENT_VERSION = 1;
426 | DYLIB_INSTALL_NAME_BASE = "@rpath";
427 | INFOPLIST_FILE = ShuffleTextLabel/Info.plist;
428 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
430 | PRODUCT_BUNDLE_IDENTIFIER = com.hoppenichu.ShuffleTextLabel;
431 | PRODUCT_NAME = "$(TARGET_NAME)";
432 | SKIP_INSTALL = YES;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
434 | };
435 | name = Debug;
436 | };
437 | 004A687E1C675A93005AF72F /* Release */ = {
438 | isa = XCBuildConfiguration;
439 | buildSettings = {
440 | CLANG_ENABLE_MODULES = YES;
441 | DEFINES_MODULE = YES;
442 | DYLIB_COMPATIBILITY_VERSION = 1;
443 | DYLIB_CURRENT_VERSION = 1;
444 | DYLIB_INSTALL_NAME_BASE = "@rpath";
445 | INFOPLIST_FILE = ShuffleTextLabel/Info.plist;
446 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
447 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
448 | PRODUCT_BUNDLE_IDENTIFIER = com.hoppenichu.ShuffleTextLabel;
449 | PRODUCT_NAME = "$(TARGET_NAME)";
450 | SKIP_INSTALL = YES;
451 | };
452 | name = Release;
453 | };
454 | 004A68801C675A93005AF72F /* Debug */ = {
455 | isa = XCBuildConfiguration;
456 | buildSettings = {
457 | INFOPLIST_FILE = ShuffleTextLabelTests/Info.plist;
458 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
459 | PRODUCT_BUNDLE_IDENTIFIER = com.hoppenichu.ShuffleTextLabelTests;
460 | PRODUCT_NAME = "$(TARGET_NAME)";
461 | };
462 | name = Debug;
463 | };
464 | 004A68811C675A93005AF72F /* Release */ = {
465 | isa = XCBuildConfiguration;
466 | buildSettings = {
467 | INFOPLIST_FILE = ShuffleTextLabelTests/Info.plist;
468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
469 | PRODUCT_BUNDLE_IDENTIFIER = com.hoppenichu.ShuffleTextLabelTests;
470 | PRODUCT_NAME = "$(TARGET_NAME)";
471 | };
472 | name = Release;
473 | };
474 | 004A68981C675B0C005AF72F /* Debug */ = {
475 | isa = XCBuildConfiguration;
476 | buildSettings = {
477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
478 | INFOPLIST_FILE = Example/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | PRODUCT_BUNDLE_IDENTIFIER = com.hoppenichu.Example;
481 | PRODUCT_NAME = "$(TARGET_NAME)";
482 | };
483 | name = Debug;
484 | };
485 | 004A68991C675B0C005AF72F /* Release */ = {
486 | isa = XCBuildConfiguration;
487 | buildSettings = {
488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
489 | INFOPLIST_FILE = Example/Info.plist;
490 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
491 | PRODUCT_BUNDLE_IDENTIFIER = com.hoppenichu.Example;
492 | PRODUCT_NAME = "$(TARGET_NAME)";
493 | };
494 | name = Release;
495 | };
496 | /* End XCBuildConfiguration section */
497 |
498 | /* Begin XCConfigurationList section */
499 | 004A68621C675A93005AF72F /* Build configuration list for PBXProject "ShuffleTextLabel" */ = {
500 | isa = XCConfigurationList;
501 | buildConfigurations = (
502 | 004A687A1C675A93005AF72F /* Debug */,
503 | 004A687B1C675A93005AF72F /* Release */,
504 | );
505 | defaultConfigurationIsVisible = 0;
506 | defaultConfigurationName = Release;
507 | };
508 | 004A687C1C675A93005AF72F /* Build configuration list for PBXNativeTarget "ShuffleTextLabel" */ = {
509 | isa = XCConfigurationList;
510 | buildConfigurations = (
511 | 004A687D1C675A93005AF72F /* Debug */,
512 | 004A687E1C675A93005AF72F /* Release */,
513 | );
514 | defaultConfigurationIsVisible = 0;
515 | };
516 | 004A687F1C675A93005AF72F /* Build configuration list for PBXNativeTarget "ShuffleTextLabelTests" */ = {
517 | isa = XCConfigurationList;
518 | buildConfigurations = (
519 | 004A68801C675A93005AF72F /* Debug */,
520 | 004A68811C675A93005AF72F /* Release */,
521 | );
522 | defaultConfigurationIsVisible = 0;
523 | };
524 | 004A68971C675B0C005AF72F /* Build configuration list for PBXNativeTarget "Example" */ = {
525 | isa = XCConfigurationList;
526 | buildConfigurations = (
527 | 004A68981C675B0C005AF72F /* Debug */,
528 | 004A68991C675B0C005AF72F /* Release */,
529 | );
530 | defaultConfigurationIsVisible = 0;
531 | };
532 | /* End XCConfigurationList section */
533 | };
534 | rootObject = 004A685F1C675A93005AF72F /* Project object */;
535 | }
536 |
--------------------------------------------------------------------------------
/ShuffleTextLabel.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ShuffleTextLabel.xcodeproj/xcshareddata/xcschemes/Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ShuffleTextLabel.xcodeproj/xcshareddata/xcschemes/ShuffleTextLabel.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/ShuffleTextLabel/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ShuffleTextLabel/ShuffleTextLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ShuffleTextLabel.h
3 | // ShuffleTextLabel
4 | //
5 | // Created by Takeru Chuganji on 2/7/16.
6 | // Copyright © 2016 Takeru Chuganji. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 |
11 | //! Project version number for ShuffleTextLabel.
12 | FOUNDATION_EXPORT const double ShuffleTextLabelVersionNumber;
13 |
14 | //! Project version string for ShuffleTextLabel.
15 | FOUNDATION_EXPORT const unsigned char ShuffleTextLabelVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ShuffleTextLabel/ShuffleTextLabel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShuffleTextLabel.swift
3 | // ShuffleTextLabel
4 | //
5 | // Created by Takeru Chuganji on 2/7/16.
6 | // Copyright © 2016 Takeru Chuganji. All rights reserved.
7 | //
8 |
9 | public class ShuffleTextLabel: UILabel {
10 | public var shuffleInterval = CFTimeInterval(0.05)
11 | public var shuffleCharactors: String.CharacterView?
12 | public var shuffleTextLength: Int? = 3
13 | public var shuffleSkipCharactorSet: NSCharacterSet? = NSCharacterSet.newlineCharacterSet()
14 |
15 | private weak var shuffleDisplayLink: CADisplayLink?
16 | private var shuffleBeginTime: CFTimeInterval?
17 | private var shuffleText: String?
18 |
19 | public func beginShuffleText(text: String) {
20 | self.invalidateShuffleText()
21 | let link = CADisplayLink(target: self, selector: "animateOneFrame:")
22 | link.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes)
23 | self.shuffleBeginTime = CACurrentMediaTime()
24 | self.shuffleText = text
25 | self.shuffleDisplayLink = link
26 | }
27 |
28 | public func invalidateShuffleText() {
29 | self.shuffleDisplayLink?.invalidate()
30 | }
31 |
32 | // MARK: Private
33 | @objc private func animateOneFrame(link: CADisplayLink) {
34 | guard let beginTime = self.shuffleBeginTime, text = self.shuffleText else {
35 | assertionFailure()
36 | return
37 | }
38 | let time = link.timestamp - beginTime
39 | let finishedIndex = Int(floor(time / self.shuffleInterval))
40 | if text.characters.count <= finishedIndex {
41 | self.invalidateShuffleText()
42 | }
43 |
44 | self.text = text.characters.enumerate().reduce("") { (current, pair) -> String in
45 | let index = pair.0
46 | let char = pair.1
47 | let shouldSkip = String(char).utf16.first.flatMap { self.shuffleSkipCharactorSet?.characterIsMember($0) } ?? false
48 | if index < finishedIndex || shouldSkip {
49 | return current + String(char)
50 | }
51 | if let shuffleTextLength = self.shuffleTextLength where shuffleTextLength + finishedIndex < index {
52 | return current
53 | }
54 | let chars = self.shuffleCharactors ?? text.characters
55 | let shuffleIndex = Int(arc4random_uniform(UInt32(chars.count)))
56 | return current + String(chars[chars.startIndex.advancedBy(shuffleIndex)])
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/ShuffleTextLabelTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ShuffleTextLabelTests/ShuffleTextLabelTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ShuffleTextLabelTests.swift
3 | // ShuffleTextLabelTests
4 | //
5 | // Created by Takeru Chuganji on 2/7/16.
6 | // Copyright © 2016 Takeru Chuganji. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import ShuffleTextLabel
11 |
12 | class ShuffleTextLabelTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | // Use XCTAssert and related functions to verify your tests produce the correct results.
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------