diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fb6bb12 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +# references: +# * https://www.objc.io/issues/6-build-tools/travis-ci/ +# * https://github.com/supermarin/xcpretty#usage + +osx_image: xcode11.2 +language: swift +xcode_project: SwiftFortuneWheel.xcodeproj # path to your xcodeproj folder +xcode_scheme: SwiftFortuneWheelTests +xcode_destination: platform=iOS Simulator,OS=13.2.2,name=iPhone 11 + +# cache: cocoapods +# podfile: Example/Podfile +# before_install: +# - gem install cocoapods # Since Travis is not always on latest version +# - pod install --project-directory=Example + +# script: +# - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/RESegmentedControl.xcworkspace -scheme RESegmentedControl-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty +# - pod lib lint diff --git a/Documentation/API_Overview.md b/Documentation/API_Overview.md index bbe115f..fe7e676 100644 --- a/Documentation/API_Overview.md +++ b/Documentation/API_Overview.md @@ -25,13 +25,13 @@ func rotate(rotationOffset: CGFloat, animationDuration: CFTimeInterval = 0.00001
-- Starts indefinite rotation animation +- Starts continuos rotation animation ``` Swift -func startAnimating() +func startContinuousRotationAnimation() ``` - Stops all animations ``` Swift -func stopAnimating() +func stopRotation() ``` @@ -39,19 +39,19 @@ func stopAnimating() - Starts rotation animation and stops rotation at the specified index and rotation angle offset. ``` Swift -func startAnimating(finishIndex: Int, rotationOffset: CGFloat, _ completion: ((Bool) -> Void)?) +func startRotationAnimation(finishIndex: Int, rotationOffset: CGFloat, _ completion: ((Bool) -> Void)?) ``` - Starts rotation animation and stops rotation at the specified index. ``` Swift -func startAnimating(finishIndex: Int, _ completion: ((Bool) -> Void)?) +func startRotationAnimation(finishIndex: Int, _ completion: ((Bool) -> Void)?) ``` - Starts rotation animation and stops rotation at the specified rotation offset angle. ``` Swift -func startAnimating(rotationOffset: CGFloat, _ completion: ((Bool) -> Void)?) +func startRotationAnimation(rotationOffset: CGFloat, _ completion: ((Bool) -> Void)?) ``` -- Starts indefinite rotation and stops rotation at the specified index. +- Starts continuos rotation and stops rotation at the specified index. ``` Swift -func startAnimating(indefiniteRotationTimeInSeconds: Int, finishIndex: Int, _ completion: ((Bool) -> Void)?) +func startRotationAnimation(finishIndex: Int, continuousRotationTime: Int, _ completion: ((Bool) -> Void)?) ``` --- diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index 883535e..82ba46c 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -1,5 +1,12 @@ ## CHANGELOG +### 1.2.0 + +- Added sound effect and haptic feedback during the rotation; +- [Issue #6](https://github.com/sh-khashimov/SwiftFortuneWheel/issues/6): animation callback added; +- Animation API refined; +- iOS Example project updated; + ### 1.1.3 - `characterWrap` type added to the `TextPreferences.LineBreakMode`; diff --git a/Documentation/GettingStarted.md b/Documentation/GettingStarted.md index 2ed8d59..304a29f 100644 --- a/Documentation/GettingStarted.md +++ b/Documentation/GettingStarted.md @@ -68,7 +68,7 @@ fortuneWheel.slices = slices - To start spin animation: ``` Swift -fortuneWheel.startAnimating(indefiniteRotationTimeInSeconds: 1, finishIndex: 0) { (finished) in +fortuneWheel.startRotationAnimation(finishIndex: 0, continuousRotationTime: 1) { (finished) in print(finished) } ``` diff --git a/Documentation/Migrations/Migration_1.1.x_to_1.2.x.md b/Documentation/Migrations/Migration_1.1.x_to_1.2.x.md new file mode 100644 index 0000000..f502e58 --- /dev/null +++ b/Documentation/Migrations/Migration_1.1.x_to_1.2.x.md @@ -0,0 +1,12 @@ +## Migration + +### from 1.1.x to 1.2.x + +- Fix the warning messages + +Animation API was changed: + +- `startAnimating` was renamed to `startRotationAnimation`; +- `stopAnimating` was renamed to `stopRotation`; +- `startAnimating(rotationTime: CFTimeInterval = 5.000, fullRotationCountInRotationTime: CGFloat = 7000)` was deprecated, use `startContinuousRotationAnimation(with: speed)` instead; +- `startAnimating(indefiniteRotationTimeInSeconds: Int, finishIndex: Int, _ completion: ((Bool) -> Void)?)` was deprecated, use `startRotationAnimation(finishIndex:continuousRotationTime:completion:)` instead; \ No newline at end of file diff --git a/Documentation/sound_effects.md b/Documentation/sound_effects.md new file mode 100644 index 0000000..b5dc5ba --- /dev/null +++ b/Documentation/sound_effects.md @@ -0,0 +1,74 @@ +## Sound Effects and Impact Feedback + +**`SwiftFortuneWheel`** can play sounds when the edge or the center of a slice moves during the rotation. Optionally, it’s possible to turn on the haptic feedback while playing sound. Or use the impact callback and implement your own effect. + + +### Edge Collision Sound Effect Example + +``` Swift +@IBOutlet weak var fortuneWheel: SwiftFortuneWheel! +// after SwiftFortuneWheel init and configuration… + +// add Click.mp3 to your project, create AudioFile, and set to edgeCollisionSound +fortuneWheel.edgeCollisionSound = AudioFile(filename: "Click", extensionName: "mp3") + +// optionally, turn on the haptic feedback for each impact +fortuneWheel.impactFeedbackOn = true + +// turn on the edge collision detection +fortuneWheel.edgeCollisionDetectionOn = true + +``` + +### Example to use callback for Edge Collision + +``` Swift +@IBOutlet weak var fortuneWheel: SwiftFortuneWheel! +// after SwiftFortuneWheel init and configuration… + +// edge collision callback with progress, if rotation is continuous, progress is equal to nil +fortuneWheel.onEdgeCollision = { progress in + print("edge collision progress: \(String(describing: progress))") +} + +// turn on the center collision detection +fortuneWheel.edgeCollisionDetectionOn = true + +``` + +### Center Collision Sound Effect Example + +``` Swift +@IBOutlet weak var fortuneWheel: SwiftFortuneWheel! +// after SwiftFortuneWheel init and configuration… + +// add Click.mp3 to your project, create AudioFile, and set to centerCollisionSound +fortuneWheel.centerCollisionSound = AudioFile(filename: "Click", extensionName: "mp3") + +// optionally, turn on the haptic feedback for each impact +fortuneWheel.impactFeedbackOn = true + +// turn on the center collision detection +fortuneWheel.centerCollisionDetectionOn = true + +``` + +### Example to use callback for Center Collision + +``` Swift +@IBOutlet weak var fortuneWheel: SwiftFortuneWheel! +// after SwiftFortuneWheel init and configuration… + +// center collision callback with progress, if rotation is continuous, progress is equal to nil +fortuneWheel.onCenterCollision = { progress in + print("center collision progress: \(String(describing: progress))") +} + +// turn on the center collision detection +fortuneWheel.centerCollisionDetectionOn = true + +``` + +> _**`impactFeedbackOn`** is only available on iOS 10 and above, not available on other platforms_ + +> **For more information, see [example projects](../Examples)** \ No newline at end of file diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS.xcodeproj/project.pbxproj b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS.xcodeproj/project.pbxproj index 17ddfee..765fc43 100644 --- a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS.xcodeproj/project.pbxproj +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS.xcodeproj/project.pbxproj @@ -22,11 +22,17 @@ 2710568F248D541B006C0181 /* Prize+SliceContentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2710568E248D541B006C0181 /* Prize+SliceContentType.swift */; }; 276E7FFF24B378E5004E9D82 /* AnimatedRotationExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276E7FFE24B378E5004E9D82 /* AnimatedRotationExampleViewController.swift */; }; 276E800224B37954004E9D82 /* LayoutExamplesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276E800124B37954004E9D82 /* LayoutExamplesViewController.swift */; }; + 276E95C5255CF9CD0018D843 /* Tick.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 276E95C4255CF9CD0018D843 /* Tick.mp3 */; }; 2794D29C24B3977B00379B6A /* SFWConfiguration+RotationExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2794D29B24B3977B00379B6A /* SFWConfiguration+RotationExample.swift */; }; + 279BA971255AAF470088BFCF /* BackgroundImageExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279BA970255AAF470088BFCF /* BackgroundImageExampleViewController.swift */; }; + 279BA974255AAF6B0088BFCF /* SoundExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279BA973255AAF6B0088BFCF /* SoundExampleViewController.swift */; }; + 279BA9B6255BA8F40088BFCF /* SFWConfiguration+BackgroundImageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279BA9B5255BA8F40088BFCF /* SFWConfiguration+BackgroundImageExample.swift */; }; + 279BA9E4255BB1FD0088BFCF /* SFWConfiguration+SoundExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279BA9E3255BB1FD0088BFCF /* SFWConfiguration+SoundExample.swift */; }; 279EEF8624B39D8000AD2AB2 /* RotationExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279EEF8524B39D8000AD2AB2 /* RotationExampleViewController.swift */; }; 279EEF8824B39F5700AD2AB2 /* Various.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 279EEF8724B39F5700AD2AB2 /* Various.storyboard */; }; 279EEF9424B5C31C00AD2AB2 /* VariousWheelSpikeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279EEF9324B5C31B00AD2AB2 /* VariousWheelSpikeViewController.swift */; }; 27C6486E24BE1A6D00CB8167 /* SplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C6486D24BE1A6D00CB8167 /* SplitViewController.swift */; }; + 27DA036A254ED51B0019A7F1 /* Click.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 27DA0369254ED51B0019A7F1 /* Click.mp3 */; }; 27E8C95724B8CF480021205F /* VariousWheelSimpleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E8C95624B8CF480021205F /* VariousWheelSimpleViewController.swift */; }; 27E8C95924B8CF690021205F /* SFWConfiguration+VariousWheelSimple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E8C95824B8CF690021205F /* SFWConfiguration+VariousWheelSimple.swift */; }; 27E8C95B24B8D2D20021205F /* Color+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E8C95A24B8D2D20021205F /* Color+Hex.swift */; }; @@ -74,11 +80,17 @@ 274E9E3524BBA05E00613A49 /* SwiftFortuneWheelDemo-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "SwiftFortuneWheelDemo-iOS.entitlements"; sourceTree = ""; }; 276E7FFE24B378E5004E9D82 /* AnimatedRotationExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedRotationExampleViewController.swift; sourceTree = ""; }; 276E800124B37954004E9D82 /* LayoutExamplesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutExamplesViewController.swift; sourceTree = ""; }; + 276E95C4255CF9CD0018D843 /* Tick.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = Tick.mp3; path = "../../SwiftFortuneWheelDemo-tvOS/SwiftFortuneWheelDemo-tvOS/SwiftFortuneWheelDemo-tvOS/Tick.mp3"; sourceTree = ""; }; 2794D29B24B3977B00379B6A /* SFWConfiguration+RotationExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SFWConfiguration+RotationExample.swift"; sourceTree = ""; }; + 279BA970255AAF470088BFCF /* BackgroundImageExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundImageExampleViewController.swift; sourceTree = ""; }; + 279BA973255AAF6B0088BFCF /* SoundExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoundExampleViewController.swift; sourceTree = ""; }; + 279BA9B5255BA8F40088BFCF /* SFWConfiguration+BackgroundImageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SFWConfiguration+BackgroundImageExample.swift"; sourceTree = ""; }; + 279BA9E3255BB1FD0088BFCF /* SFWConfiguration+SoundExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SFWConfiguration+SoundExample.swift"; sourceTree = ""; }; 279EEF8524B39D8000AD2AB2 /* RotationExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RotationExampleViewController.swift; sourceTree = ""; }; 279EEF8724B39F5700AD2AB2 /* Various.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Various.storyboard; sourceTree = ""; }; 279EEF9324B5C31B00AD2AB2 /* VariousWheelSpikeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VariousWheelSpikeViewController.swift; sourceTree = ""; }; 27C6486D24BE1A6D00CB8167 /* SplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitViewController.swift; sourceTree = ""; }; + 27DA0369254ED51B0019A7F1 /* Click.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Click.mp3; sourceTree = ""; }; 27E8C95624B8CF480021205F /* VariousWheelSimpleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VariousWheelSimpleViewController.swift; sourceTree = ""; }; 27E8C95824B8CF690021205F /* SFWConfiguration+VariousWheelSimple.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SFWConfiguration+VariousWheelSimple.swift"; sourceTree = ""; }; 27E8C95A24B8D2D20021205F /* Color+Hex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Hex.swift"; sourceTree = ""; }; @@ -155,6 +167,8 @@ 27E8C96A24B9B42D0021205F /* ToyBox.ttf */, 274E9E3324BB9F5100613A49 /* Info.plist */, 27E8C96824B9B3250021205F /* Ode to Idle Gaming.otf */, + 276E95C4255CF9CD0018D843 /* Tick.mp3 */, + 27DA0369254ED51B0019A7F1 /* Click.mp3 */, 27105636248D3C9F006C0181 /* Assets.xcassets */, 27105638248D3C9F006C0181 /* LaunchScreen.storyboard */, ); @@ -169,13 +183,13 @@ name = Frameworks; sourceTree = ""; }; - 2720251E24A36F6300240E4E /* DynamicContentExampleViewController */ = { + 2720251E24A36F6300240E4E /* DynamicContentExample */ = { isa = PBXGroup; children = ( 27105688248D4EC8006C0181 /* DynamicContentViewExampleController.swift */, 2710568A248D53EF006C0181 /* SFWConfiguration+DynamicContentExample.swift */, ); - path = DynamicContentExampleViewController; + path = DynamicContentExample; sourceTree = ""; }; 276E7FFD24B378A0004E9D82 /* RotationExample */ = { @@ -208,7 +222,9 @@ 2780E81124B36E3F007BDE7B /* ViewControllers */ = { isa = PBXGroup; children = ( - 2720251E24A36F6300240E4E /* DynamicContentExampleViewController */, + 279BA972255AAF520088BFCF /* SoundExample */, + 279BA96F255AAF070088BFCF /* BackgroundImageExample */, + 2720251E24A36F6300240E4E /* DynamicContentExample */, 276E7FFD24B378A0004E9D82 /* RotationExample */, 2794D29D24B39BDD00379B6A /* AnimatedRotationExample */, 270CCFDB24B3759100924FBF /* WithoutStoryboardExample */, @@ -228,6 +244,24 @@ path = AnimatedRotationExample; sourceTree = ""; }; + 279BA96F255AAF070088BFCF /* BackgroundImageExample */ = { + isa = PBXGroup; + children = ( + 279BA970255AAF470088BFCF /* BackgroundImageExampleViewController.swift */, + 279BA9B5255BA8F40088BFCF /* SFWConfiguration+BackgroundImageExample.swift */, + ); + path = BackgroundImageExample; + sourceTree = ""; + }; + 279BA972255AAF520088BFCF /* SoundExample */ = { + isa = PBXGroup; + children = ( + 279BA973255AAF6B0088BFCF /* SoundExampleViewController.swift */, + 279BA9E3255BB1FD0088BFCF /* SFWConfiguration+SoundExample.swift */, + ); + path = SoundExample; + sourceTree = ""; + }; 279EEF8924B39F7C00AD2AB2 /* Various */ = { isa = PBXGroup; children = ( @@ -334,6 +368,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 27DA036A254ED51B0019A7F1 /* Click.mp3 in Resources */, + 276E95C5255CF9CD0018D843 /* Tick.mp3 in Resources */, 2710563A248D3C9F006C0181 /* LaunchScreen.storyboard in Resources */, 27E8C96B24B9B42D0021205F /* ToyBox.ttf in Resources */, 27105637248D3C9F006C0181 /* Assets.xcassets in Resources */, @@ -352,16 +388,20 @@ files = ( 27E8C95E24B8D8560021205F /* VariousWheelJackpotViewController.swift in Sources */, 27FA0A1B24B5C3D800CA1F02 /* SFWConfiguration+VariousWheelSpike.swift in Sources */, + 279BA9B6255BA8F40088BFCF /* SFWConfiguration+BackgroundImageExample.swift in Sources */, 2710568D248D53EF006C0181 /* Prize.swift in Sources */, 27E8C96524B8E1590021205F /* SFWConfiguration+VariousWheelPodium.swift in Sources */, 2703B4F6248E2A9500FB50F9 /* UIView+CornerRadius.swift in Sources */, + 279BA971255AAF470088BFCF /* BackgroundImageExampleViewController.swift in Sources */, 27F7D5B924A51C5D004BEE19 /* WithoutStoryboardExampleViewController.swift in Sources */, 2710568F248D541B006C0181 /* Prize+SliceContentType.swift in Sources */, 27E8C95B24B8D2D20021205F /* Color+Hex.swift in Sources */, 279EEF8624B39D8000AD2AB2 /* RotationExampleViewController.swift in Sources */, + 279BA9E4255BB1FD0088BFCF /* SFWConfiguration+SoundExample.swift in Sources */, 27FA0A1D24B5CA1F00CA1F02 /* LayoutCollectionViewCell.swift in Sources */, 27C6486E24BE1A6D00CB8167 /* SplitViewController.swift in Sources */, 27E8C95924B8CF690021205F /* SFWConfiguration+VariousWheelSimple.swift in Sources */, + 279BA974255AAF6B0088BFCF /* SoundExampleViewController.swift in Sources */, 27E8C96024B8D87E0021205F /* SFWConfiguration+VariousWheelJackpot.swift in Sources */, 27105687248D4E49006C0181 /* MainViewController.swift in Sources */, 276E800224B37954004E9D82 /* LayoutExamplesViewController.swift in Sources */, @@ -451,7 +491,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.5; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -506,7 +546,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.5; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -524,7 +564,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = M626AUYJ9J; INFOPLIST_FILE = "$(SRCROOT)/SwiftFortuneWheelDemo-iOS/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 13.1; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -545,7 +585,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = M626AUYJ9J; INFOPLIST_FILE = "$(SRCROOT)/SwiftFortuneWheelDemo-iOS/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 13.1; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Colorful-Plait-Background.imageset/Colorful-Plait-Background.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Colorful-Plait-Background.imageset/Colorful-Plait-Background.jpg new file mode 100644 index 0000000..148ac4d Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Colorful-Plait-Background.imageset/Colorful-Plait-Background.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Colorful-Plait-Background.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Colorful-Plait-Background.imageset/Contents.json new file mode 100644 index 0000000..c50d91e --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Colorful-Plait-Background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Colorful-Plait-Background.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Geometric-Background-Colorful-Vector.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Geometric-Background-Colorful-Vector.imageset/Contents.json new file mode 100644 index 0000000..e61c1e6 --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Geometric-Background-Colorful-Vector.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Geometric-Background-Colorful-Vector.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Geometric-Background-Colorful-Vector.imageset/Geometric-Background-Colorful-Vector.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Geometric-Background-Colorful-Vector.imageset/Geometric-Background-Colorful-Vector.jpg new file mode 100644 index 0000000..f1f0a8e Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/Geometric-Background-Colorful-Vector.imageset/Geometric-Background-Colorful-Vector.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/abstract-geometric-background-with-a-3d-kjpargeter.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/abstract-geometric-background-with-a-3d-kjpargeter.imageset/Contents.json new file mode 100644 index 0000000..a0c04ce --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/abstract-geometric-background-with-a-3d-kjpargeter.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "abstract-geometric-background-with-a-3d-kjpargeter.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/abstract-geometric-background-with-a-3d-kjpargeter.imageset/abstract-geometric-background-with-a-3d-kjpargeter.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/abstract-geometric-background-with-a-3d-kjpargeter.imageset/abstract-geometric-background-with-a-3d-kjpargeter.jpg new file mode 100644 index 0000000..c1dcdd8 Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/abstract-geometric-background-with-a-3d-kjpargeter.imageset/abstract-geometric-background-with-a-3d-kjpargeter.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586960.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586960.imageset/Contents.json new file mode 100644 index 0000000..6427bb6 --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586960.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "layered_colored_modern_background_vector_586960.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586960.imageset/layered_colored_modern_background_vector_586960.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586960.imageset/layered_colored_modern_background_vector_586960.jpg new file mode 100644 index 0000000..bfab0f0 Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586960.imageset/layered_colored_modern_background_vector_586960.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586963.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586963.imageset/Contents.json new file mode 100644 index 0000000..79f1160 --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586963.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "layered_colored_modern_background_vector_586963.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586963.imageset/layered_colored_modern_background_vector_586963.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586963.imageset/layered_colored_modern_background_vector_586963.jpg new file mode 100644 index 0000000..eb91672 Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_586963.imageset/layered_colored_modern_background_vector_586963.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_587001.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_587001.imageset/Contents.json new file mode 100644 index 0000000..7fb7e0c --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_587001.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "layered_colored_modern_background_vector_587001.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_587001.imageset/layered_colored_modern_background_vector_587001.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_587001.imageset/layered_colored_modern_background_vector_587001.jpg new file mode 100644 index 0000000..4e60a33 Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/layered_colored_modern_background_vector_587001.imageset/layered_colored_modern_background_vector_587001.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/modern-colorful-background_1035-3255.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/modern-colorful-background_1035-3255.imageset/Contents.json new file mode 100644 index 0000000..ac217ed --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/modern-colorful-background_1035-3255.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "modern-colorful-background_1035-3255.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/modern-colorful-background_1035-3255.imageset/modern-colorful-background_1035-3255.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/modern-colorful-background_1035-3255.imageset/modern-colorful-background_1035-3255.jpg new file mode 100644 index 0000000..55f806d Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/modern-colorful-background_1035-3255.imageset/modern-colorful-background_1035-3255.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/orange_3d_geometric_abstract_background_6815666.imageset/Contents.json b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/orange_3d_geometric_abstract_background_6815666.imageset/Contents.json new file mode 100644 index 0000000..8176dcb --- /dev/null +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/orange_3d_geometric_abstract_background_6815666.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "orange_3d_geometric_abstract_background_6815666.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/orange_3d_geometric_abstract_background_6815666.imageset/orange_3d_geometric_abstract_background_6815666.jpg b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/orange_3d_geometric_abstract_background_6815666.imageset/orange_3d_geometric_abstract_background_6815666.jpg new file mode 100644 index 0000000..ec1af01 Binary files /dev/null and b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Assets.xcassets/orange_3d_geometric_abstract_background_6815666.imageset/orange_3d_geometric_abstract_background_6815666.jpg differ diff --git a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Base.lproj/Main.storyboard b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Base.lproj/Main.storyboard index ee23c69..104e849 100644 --- a/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Base.lproj/Main.storyboard +++ b/Examples/SwiftFortuneWheelDemo-iOS/SwiftFortuneWheelDemo-iOS/Base.lproj/Main.storyboard @@ -1,9 +1,11 @@ - + - + + + @@ -20,20 +22,20 @@ - + - + - + @@ -41,25 +43,37 @@ - - - + + + + + + + + + + + + - + + + + - + - - -