Repository: takuoka/TKSubmitTransition
Branch: master
Commit: 1960d8e644c2
Files: 24
Total size: 63.1 KB
Directory structure:
gitextract_27mxihz1/
├── .gitignore
├── LICENSE
├── README.md
├── SubmitTransition/
│ ├── AppDelegate.swift
│ ├── Base.lproj/
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Classes/
│ │ ├── CGRectEx.swift
│ │ ├── FadeTransition.swift
│ │ ├── SpinerLayer.swift
│ │ ├── TimerEx.swift
│ │ └── TransitionSubmitButton.swift
│ ├── Images.xcassets/
│ │ ├── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ ├── Home.imageset/
│ │ │ └── Contents.json
│ │ ├── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ └── Login.imageset/
│ │ └── Contents.json
│ ├── Info.plist
│ ├── SecondViewController.swift
│ └── ViewController.swift
├── SubmitTransition.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ └── IDEWorkspaceChecks.plist
├── SubmitTransitionTests/
│ ├── Info.plist
│ └── SubmitTransitionTests.swift
└── TKSubmitTransition.podspec
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
#Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
.DS_Store
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Takuya Okamoto
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# TKSubmitTransition
[](https://developer.apple.com/iphone/index.action)
[](https://developer.apple.com/swift)
[](http://mit-license.org)
[]()
Inpired by https://dribbble.com/shots/1945593-Login-Home-Screen
I created Animated UIButton of Loading Animation and Transition Animation.
As you can see in the GIF Animation Demo below, you can find the “Sign in” button rolling and after that, next UIViewController will fade-in.
I made them as classes and you can use it with ease.
[Objective-C version is here.](https://github.com/wwdc14/HySubmitTransitionObjective-C)
# Demo

# Installation
## Cocoapods ##
**Swift 5**
``` ruby
pod 'TKSubmitTransition', :git => 'https://github.com/entotsu/TKSubmitTransition.git'
```
**Swift 4**
``` ruby
pod 'TKSubmitTransition', :git => 'https://github.com/entotsu/TKSubmitTransition.git', :branch => 'swift4'
```
**Swift 3**
``` ruby
pod 'TKSubmitTransition', :git => 'https://github.com/entotsu/TKSubmitTransition.git', :tag => '2.0'
```
**Swift 2 & Below**
``` ruby
pod 'TKSubmitTransition', '~> 0.2'
```
## Manually ##
Drag all the files from `SubmitTransition/Classes` into your project.
# Usage
### Storyboard
Just drag a `UIButton` on to your storyboard and change the custom class to `TKSubmitTransition` in the identity inspector.

Change the settings of the button via the storyboard.

Then create an `IBOutlet` to your view controller.

You can now move on to `Animation Method` for further instructions.
### Programatically
You can use `TKTransitionSubmitButton` just like any other `UIButton`. It works practically the same.
Add this at the top of your file:
``` swift
import SubmitTransition
```
Then create a variable above your view did load for the button
``` swift
var bin: TKTransitionSubmitButton!
```
then finally in the view did load add the button
``` swift
btn = TKTransitionSubmitButton(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width - 64, height: 44))
btn.center = self.view.center
btn.frame.bottom = self.view.frame.height - 60
btn.setTitle("Sign in", for: UIControlState())
btn.titleLabel?.font = UIFont(name: "HelveticaNeue-Light", size: 14)
self.view.addSubview(btn)
```
## Animation Method
Use this to animate your button. Follow the steps in `Delegation` to setup the transition.
``` swift
func didStartYourLoading() {
btn.startLoadingAnimation()
}
func didFinishYourLoading() {
btn.startFinishAnimation {
//Your Transition
let secondVC = SecondViewController()
secondVC.transitioningDelegate = self
self.presentViewController(secondVC, animated: true, completion: nil)
}
}
```
## Networking
If you are running requests to a server and are waiting a responce, you can use something like this to stop and start the animation:
``` swift
// start loading the button animations
button.startLoadingAnimation()
// run query in background thread
async.background {
let query = PFQuery(className: "Blah")
query.whereKey("user", equalTo: user)
let results = try! query.findObjects()
if results.count == 0 {
// insert alertView telling user that their details don't work
}
else {
// return to main thread to complete login
async.main {
// tell the button to finish its animations
button.startFinishingAnimation(1) {
let sb = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "MainVC")
vc.transitioningDelegate = self
self.present(vc, animated: true, completion: nil)
}
}
}
```
Thanks to [@sarfrazb](https://github.com/sarfrazb) for pointing this out.
## TKFadeInAnimator
This Library also supply fade-in Animator Class of `UIViewControllerAnimatedTransitioning`.
Please use This for transition animation.
### Delegation
#### Make sure your class implements the UIViewControllerTransitioningDelegate protocol like so
> class ViewController: UIViewController, UIViewControllerTransitioningDelegate {
#### Setup the transitioning delegate
`secondVC.transitioningDelegate = self`
#### Implement the delegate
**Swift 3/4**
``` swift
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return TKFadeInAnimator(transitionDuration: 0.5, startingAlpha: 0.8)
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return nil
}
```
**Swift 2 & Below**
``` swift
// MARK: UIViewControllerTransitioningDelegate
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
let fadeInAnimator = TKFadeInAnimator()
return fadeInAnimator
}
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return nil
}
```
If you need any help with the setup feel free to look at the sample or create an issue.
# Contribution
- If you've found a bug, please open an issue.
- If you've a feature request, please open a pull request
- Please check any closed issues before you open a new one!
================================================
FILE: SubmitTransition/AppDelegate.swift
================================================
//
// AppDelegate.swift
// SubmitTransition
//
// Created by Takuya Okamoto on 2015/08/06.
// Copyright (c) 2015年 Uniface. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// 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.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// 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.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
================================================
FILE: SubmitTransition/Base.lproj/LaunchScreen.xib
================================================
================================================
FILE: SubmitTransition/Base.lproj/Main.storyboard
================================================
================================================
FILE: SubmitTransition/Classes/CGRectEx.swift
================================================
//
// CGRectEx.swift
// SubmitTransition
//
// Created by Takuya Okamoto on 2015/08/07.
// Copyright (c) 2015年 Uniface. All rights reserved.
//
import UIKit
extension CGRect {
var x: CGFloat {
get {
return self.origin.x
}
set {
self = CGRect(x: newValue, y: self.y, width: self.width, height: self.height)
}
}
var y: CGFloat {
get {
return self.origin.y
}
set {
self = CGRect(x: self.x, y: newValue, width: self.width, height: self.height)
}
}
var width: CGFloat {
get {
return self.size.width
}
set {
self = CGRect(x: self.x, y: self.y, width: newValue, height: self.height)
}
}
var height: CGFloat {
get {
return self.size.height
}
set {
self = CGRect(x: self.x, y: self.y, width: self.width, height: newValue)
}
}
var top: CGFloat {
get {
return self.origin.y
}
set {
y = newValue
}
}
var bottom: CGFloat {
get {
return self.origin.y + self.size.height
}
set {
self = CGRect(x: x, y: newValue - height, width: width, height: height)
}
}
var left: CGFloat {
get {
return self.origin.x
}
set {
self.x = newValue
}
}
var right: CGFloat {
get {
return x + width
}
set {
self = CGRect(x: newValue - width, y: y, width: width, height: height)
}
}
var midX: CGFloat {
get {
return self.x + self.width / 2
}
set {
self = CGRect(x: newValue - width / 2, y: y, width: width, height: height)
}
}
var midY: CGFloat {
get {
return self.y + self.height / 2
}
set {
self = CGRect(x: x, y: newValue - height / 2, width: width, height: height)
}
}
var center: CGPoint {
get {
return CGPoint(x: self.midX, y: self.midY)
}
set {
self = CGRect(x: newValue.x - width / 2, y: newValue.y - height / 2, width: width, height: height)
}
}
}
================================================
FILE: SubmitTransition/Classes/FadeTransition.swift
================================================
//
// FadeTransition.swift
// SubmitTransition
//
// Created by Takuya Okamoto on 2015/08/07.
// Copyright (c) 2015年 Uniface. All rights reserved.
//
import UIKit
open class TKFadeInAnimator: NSObject, UIViewControllerAnimatedTransitioning {
var transitionDuration: TimeInterval = 0.5
var startingAlpha: CGFloat = 0.0
public convenience init(transitionDuration: TimeInterval, startingAlpha: CGFloat){
self.init()
self.transitionDuration = transitionDuration
self.startingAlpha = startingAlpha
}
open func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
return transitionDuration
}
open func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
let containerView = transitionContext.containerView
let toView = transitionContext.view(forKey: .to)!
let fromView = (transitionContext.viewController(forKey: .from)?.view)!
toView.alpha = startingAlpha
fromView.alpha = 0.8
containerView.addSubview(toView)
UIView.animate(withDuration: self.transitionDuration(using: transitionContext), animations: { () -> Void in
toView.alpha = 1.0
fromView.alpha = 0.0
}, completion: {
_ in
fromView.alpha = 1.0
transitionContext.completeTransition(true)
})
}
}
================================================
FILE: SubmitTransition/Classes/SpinerLayer.swift
================================================
import UIKit
class SpinerLayer: CAShapeLayer {
var spinnerColor = UIColor.white {
didSet {
strokeColor = spinnerColor.cgColor
}
}
init(frame:CGRect) {
super.init()
let radius:CGFloat = (frame.height / 2) * 0.5
self.frame = CGRect(x: 0, y: 0, width: frame.height, height: frame.height)
let center = CGPoint(x: frame.height / 2, y: bounds.center.y)
let startAngle = 0 - (Double.pi / 2)
let endAngle = Double.pi * 2 - (Double.pi / 2)
let clockwise: Bool = true
self.path = UIBezierPath(arcCenter: center, radius: radius, startAngle: CGFloat(startAngle), endAngle: CGFloat(endAngle), clockwise: clockwise).cgPath
self.fillColor = nil
self.strokeColor = spinnerColor.cgColor
self.lineWidth = 1
self.strokeEnd = 0.4
self.isHidden = true
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func animation() {
self.isHidden = false
let rotate = CABasicAnimation(keyPath: "transform.rotation.z")
rotate.fromValue = 0
rotate.toValue = Double.pi * 2
rotate.duration = 0.4
rotate.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear)
rotate.repeatCount = HUGE
rotate.fillMode = CAMediaTimingFillMode.forwards
rotate.isRemovedOnCompletion = false
self.add(rotate, forKey: rotate.keyPath)
}
func stopAnimation() {
self.isHidden = true
self.removeAllAnimations()
}
}
================================================
FILE: SubmitTransition/Classes/TimerEx.swift
================================================
//
// NSTimerEx.swift
// SubmitTransition
//
// Created by Takuya Okamoto on 2015/08/06.
// Copyright (c) 2015年 Uniface. All rights reserved.
//
import Foundation
extension Timer {
@discardableResult class func schedule(delay: TimeInterval, handler: ((Timer?) -> Void)!) -> Timer! {
let fireDate = delay + CFAbsoluteTimeGetCurrent()
let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, 0, 0, 0, handler)
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, .commonModes)
return timer
}
@discardableResult class func schedule(repeatInterval interval: TimeInterval, handler: ((Timer?) -> Void)!) -> Timer! {
let fireDate = interval + CFAbsoluteTimeGetCurrent()
let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, interval, 0, 0, handler)
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, .commonModes)
return timer
}
/*class func schedule(delay delay: NSTimeInterval, handler: NSTimer! -> Void) -> NSTimer {
let fireDate = delay + CFAbsoluteTimeGetCurrent()
let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, 0, 0, 0, handler)
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopCommonModes)
return timer
}
class func schedule(repeatInterval interval: NSTimeInterval, handler: NSTimer! -> Void) -> NSTimer {
let fireDate = interval + CFAbsoluteTimeGetCurrent()
let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, interval, 0, 0, handler)
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopCommonModes)
return timer
}*/
}
================================================
FILE: SubmitTransition/Classes/TransitionSubmitButton.swift
================================================
import Foundation
import UIKit
@IBDesignable
open class TKTransitionSubmitButton : UIButton, UIViewControllerTransitioningDelegate, CAAnimationDelegate {
lazy var spiner: SpinerLayer! = {
let s = SpinerLayer(frame: self.frame)
return s
}()
@IBInspectable open var spinnerColor: UIColor = UIColor.white {
didSet {
spiner.spinnerColor = spinnerColor
}
}
open var didEndFinishAnimation : (()->())? = nil
let springGoEase = CAMediaTimingFunction(controlPoints: 0.45, -0.36, 0.44, 0.92)
let shrinkCurve = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear)
let expandCurve = CAMediaTimingFunction(controlPoints: 0.95, 0.02, 1, 0.05)
let shrinkDuration: CFTimeInterval = 0.1
@IBInspectable open var normalCornerRadius:CGFloat = 0.0 {
didSet {
self.layer.cornerRadius = normalCornerRadius
}
}
var cachedTitle: String?
var isAnimating = false
public override init(frame: CGRect) {
super.init(frame: frame)
self.setup()
}
public required init!(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)!
self.setup()
}
func setup() {
self.clipsToBounds = true
spiner.spinnerColor = spinnerColor
}
open func startLoadingAnimation() {
self.isAnimating = true
self.cachedTitle = title(for: UIControl.State())
self.setTitle("", for: UIControl.State())
self.layer.addSublayer(spiner)
// Animate
self.cornerRadius()
self.shrink()
_ = Timer.schedule(delay: self.shrinkDuration - 0.25) { timer in
self.spiner.animation()
}
}
open func startFinishAnimation(_ delay: TimeInterval, completion:(()->())?) {
self.isAnimating = true
_ = Timer.schedule(delay: delay) { timer in
self.didEndFinishAnimation = completion
self.expand()
self.spiner.stopAnimation()
}
}
open func animate(_ duration: TimeInterval, completion:(()->())?) {
startLoadingAnimation()
startFinishAnimation(duration, completion: completion)
}
open func setOriginalState() {
self.returnToOriginalState()
self.spiner.stopAnimation()
}
public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
let a = anim as! CABasicAnimation
if a.keyPath == "transform.scale" {
didEndFinishAnimation?()
_ = Timer.schedule(delay: 1) { timer in
self.returnToOriginalState()
}
}
}
open func returnToOriginalState() {
self.spiner.removeFromSuperlayer()
self.layer.removeAllAnimations()
self.setTitle(self.cachedTitle, for: UIControl.State())
self.spiner.stopAnimation()
self.isAnimating = false
}
func cornerRadius() {
let cornerRadiusAnim = CABasicAnimation(keyPath: "cornerRadius")
// cornerRadiusAnim.fromValue = frame.width
cornerRadiusAnim.toValue = frame.height/2
cornerRadiusAnim.duration = shrinkDuration
cornerRadiusAnim.timingFunction = shrinkCurve
cornerRadiusAnim.fillMode = CAMediaTimingFillMode.forwards
cornerRadiusAnim.isRemovedOnCompletion = false
layer.add(cornerRadiusAnim, forKey: cornerRadiusAnim.keyPath)
}
func shrink() {
let shrinkAnim = CABasicAnimation(keyPath: "bounds.size.width")
shrinkAnim.beginTime = CACurrentMediaTime() + 0.1
shrinkAnim.fromValue = frame.width
shrinkAnim.toValue = frame.height
shrinkAnim.duration = shrinkDuration
shrinkAnim.timingFunction = shrinkCurve
shrinkAnim.fillMode = CAMediaTimingFillMode.forwards
shrinkAnim.isRemovedOnCompletion = false
layer.add(shrinkAnim, forKey: shrinkAnim.keyPath)
}
func expand() {
let expandAnim = CABasicAnimation(keyPath: "transform.scale")
expandAnim.fromValue = 1.0
expandAnim.toValue = 26.0
expandAnim.timingFunction = expandCurve
expandAnim.duration = 0.3
expandAnim.delegate = self
expandAnim.fillMode = CAMediaTimingFillMode.forwards
expandAnim.isRemovedOnCompletion = false
layer.add(expandAnim, forKey: expandAnim.keyPath)
}
}
================================================
FILE: SubmitTransition/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: SubmitTransition/Images.xcassets/Home.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "Home.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: SubmitTransition/Images.xcassets/LaunchImage.launchimage/Contents.json
================================================
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: SubmitTransition/Images.xcassets/Login.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "Login.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: SubmitTransition/Info.plist
================================================
CFBundleDevelopmentRegion
en
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
APPL
CFBundleShortVersionString
1.0
CFBundleSignature
????
CFBundleVersion
1
LSRequiresIPhoneOS
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
Main
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIViewControllerBasedStatusBarAppearance
================================================
FILE: SubmitTransition/SecondViewController.swift
================================================
//
// SecondViewController.swift
// SubmitTransition
//
// Created by Takuya Okamoto on 2015/08/07.
// Copyright (c) 2015年 Uniface. All rights reserved.
//
import UIKit
class SecondViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let bg = UIImageView(image: UIImage(named: "Home"))
bg.frame = self.view.frame
self.view.addSubview(bg)
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(SecondViewController.onTapScreen))
bg.isUserInteractionEnabled = true
bg.addGestureRecognizer(tapRecognizer)
}
@objc func onTapScreen() {
self.dismiss(animated: true, completion: nil)
}
}
================================================
FILE: SubmitTransition/ViewController.swift
================================================
import UIKit
class ViewController: UIViewController, UIViewControllerTransitioningDelegate {
var btn: TKTransitionSubmitButton!
@IBOutlet weak var btnFromNib: TKTransitionSubmitButton!
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.setStatusBarStyle(.lightContent, animated: false)
let bg = UIImageView(image: UIImage(named: "Login"))
bg.frame = self.view.frame
self.view.addSubview(bg)
btn = TKTransitionSubmitButton(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width - 64, height: 44))
btn.center = self.view.center
btn.backgroundColor = .red
btn.frame.bottom = self.view.frame.height - 60
btn.setTitle("Sign in", for: UIControl.State())
btn.titleLabel?.font = UIFont(name: "HelveticaNeue-Light", size: 14)
btn.addTarget(self, action: #selector(ViewController.onTapButton(_:)), for: UIControl.Event.touchUpInside)
self.view.addSubview(btn)
self.view.bringSubviewToFront(self.btnFromNib)
}
@IBAction func onTapButton(_ button: TKTransitionSubmitButton) {
button.animate(1, completion: { () -> () in
let secondVC = SecondViewController()
secondVC.transitioningDelegate = self
secondVC.modalPresentationStyle = .fullScreen
self.present(secondVC, animated: true, completion: nil)
})
}
// MARK: UIViewControllerTransitioningDelegate
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return TKFadeInAnimator(transitionDuration: 0.5, startingAlpha: 0.8)
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return nil
}
}
================================================
FILE: SubmitTransition.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B00C1CC21B7495FC00412E02 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B00C1CC11B7495FC00412E02 /* SecondViewController.swift */; };
B0FAC85E1B7356F40034E00B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC85D1B7356F40034E00B /* AppDelegate.swift */; };
B0FAC8601B7356F40034E00B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC85F1B7356F40034E00B /* ViewController.swift */; };
B0FAC8631B7356F40034E00B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0FAC8611B7356F40034E00B /* Main.storyboard */; };
B0FAC8651B7356F40034E00B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0FAC8641B7356F40034E00B /* Images.xcassets */; };
B0FAC8681B7356F40034E00B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B0FAC8661B7356F40034E00B /* LaunchScreen.xib */; };
B0FAC8741B7356F40034E00B /* SubmitTransitionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC8731B7356F40034E00B /* SubmitTransitionTests.swift */; };
B0FAC87F1B7359000034E00B /* TransitionSubmitButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC87E1B7359000034E00B /* TransitionSubmitButton.swift */; };
B0FAC8851B736C460034E00B /* TimerEx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC8841B736C460034E00B /* TimerEx.swift */; };
B0FAC8871B7440190034E00B /* CGRectEx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC8861B7440190034E00B /* CGRectEx.swift */; };
B0FAC8891B744FB10034E00B /* SpinerLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC8881B744FB10034E00B /* SpinerLayer.swift */; };
B0FAC88B1B747F990034E00B /* FadeTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FAC88A1B747F990034E00B /* FadeTransition.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
B0FAC86E1B7356F40034E00B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B0FAC8501B7356F30034E00B /* Project object */;
proxyType = 1;
remoteGlobalIDString = B0FAC8571B7356F30034E00B;
remoteInfo = SubmitTransition;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
B00C1CC11B7495FC00412E02 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; };
B0FAC8581B7356F30034E00B /* SubmitTransition.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SubmitTransition.app; sourceTree = BUILT_PRODUCTS_DIR; };
B0FAC85C1B7356F30034E00B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
B0FAC85D1B7356F40034E00B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
B0FAC85F1B7356F40034E00B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
B0FAC8621B7356F40034E00B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
B0FAC8641B7356F40034E00B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
B0FAC8671B7356F40034E00B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
B0FAC86D1B7356F40034E00B /* SubmitTransitionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SubmitTransitionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
B0FAC8721B7356F40034E00B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
B0FAC8731B7356F40034E00B /* SubmitTransitionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubmitTransitionTests.swift; sourceTree = ""; };
B0FAC87E1B7359000034E00B /* TransitionSubmitButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionSubmitButton.swift; sourceTree = ""; };
B0FAC8841B736C460034E00B /* TimerEx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimerEx.swift; sourceTree = ""; };
B0FAC8861B7440190034E00B /* CGRectEx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGRectEx.swift; sourceTree = ""; };
B0FAC8881B744FB10034E00B /* SpinerLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinerLayer.swift; sourceTree = ""; };
B0FAC88A1B747F990034E00B /* FadeTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FadeTransition.swift; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B0FAC8551B7356F30034E00B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
B0FAC86A1B7356F40034E00B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B0FAC84F1B7356F30034E00B = {
isa = PBXGroup;
children = (
B0FAC85A1B7356F30034E00B /* SubmitTransition */,
B0FAC8701B7356F40034E00B /* SubmitTransitionTests */,
B0FAC8591B7356F30034E00B /* Products */,
);
sourceTree = "";
};
B0FAC8591B7356F30034E00B /* Products */ = {
isa = PBXGroup;
children = (
B0FAC8581B7356F30034E00B /* SubmitTransition.app */,
B0FAC86D1B7356F40034E00B /* SubmitTransitionTests.xctest */,
);
name = Products;
sourceTree = "";
};
B0FAC85A1B7356F30034E00B /* SubmitTransition */ = {
isa = PBXGroup;
children = (
B0FAC87D1B7358C90034E00B /* Classes */,
B0FAC85D1B7356F40034E00B /* AppDelegate.swift */,
B0FAC85F1B7356F40034E00B /* ViewController.swift */,
B00C1CC11B7495FC00412E02 /* SecondViewController.swift */,
B0FAC8611B7356F40034E00B /* Main.storyboard */,
B0FAC8641B7356F40034E00B /* Images.xcassets */,
B0FAC8661B7356F40034E00B /* LaunchScreen.xib */,
B0FAC85B1B7356F30034E00B /* Supporting Files */,
);
path = SubmitTransition;
sourceTree = "";
};
B0FAC85B1B7356F30034E00B /* Supporting Files */ = {
isa = PBXGroup;
children = (
B0FAC85C1B7356F30034E00B /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "";
};
B0FAC8701B7356F40034E00B /* SubmitTransitionTests */ = {
isa = PBXGroup;
children = (
B0FAC8731B7356F40034E00B /* SubmitTransitionTests.swift */,
B0FAC8711B7356F40034E00B /* Supporting Files */,
);
path = SubmitTransitionTests;
sourceTree = "";
};
B0FAC8711B7356F40034E00B /* Supporting Files */ = {
isa = PBXGroup;
children = (
B0FAC8721B7356F40034E00B /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "";
};
B0FAC87D1B7358C90034E00B /* Classes */ = {
isa = PBXGroup;
children = (
B0FAC87E1B7359000034E00B /* TransitionSubmitButton.swift */,
B0FAC8881B744FB10034E00B /* SpinerLayer.swift */,
B0FAC88A1B747F990034E00B /* FadeTransition.swift */,
B0FAC8861B7440190034E00B /* CGRectEx.swift */,
B0FAC8841B736C460034E00B /* TimerEx.swift */,
);
path = Classes;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B0FAC8571B7356F30034E00B /* SubmitTransition */ = {
isa = PBXNativeTarget;
buildConfigurationList = B0FAC8771B7356F40034E00B /* Build configuration list for PBXNativeTarget "SubmitTransition" */;
buildPhases = (
B0FAC8541B7356F30034E00B /* Sources */,
B0FAC8551B7356F30034E00B /* Frameworks */,
B0FAC8561B7356F30034E00B /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = SubmitTransition;
productName = SubmitTransition;
productReference = B0FAC8581B7356F30034E00B /* SubmitTransition.app */;
productType = "com.apple.product-type.application";
};
B0FAC86C1B7356F40034E00B /* SubmitTransitionTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = B0FAC87A1B7356F40034E00B /* Build configuration list for PBXNativeTarget "SubmitTransitionTests" */;
buildPhases = (
B0FAC8691B7356F40034E00B /* Sources */,
B0FAC86A1B7356F40034E00B /* Frameworks */,
B0FAC86B1B7356F40034E00B /* Resources */,
);
buildRules = (
);
dependencies = (
B0FAC86F1B7356F40034E00B /* PBXTargetDependency */,
);
name = SubmitTransitionTests;
productName = SubmitTransitionTests;
productReference = B0FAC86D1B7356F40034E00B /* SubmitTransitionTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B0FAC8501B7356F30034E00B /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = Uniface;
TargetAttributes = {
B0FAC8571B7356F30034E00B = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 1030;
};
B0FAC86C1B7356F40034E00B = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 1030;
TestTargetID = B0FAC8571B7356F30034E00B;
};
};
};
buildConfigurationList = B0FAC8531B7356F30034E00B /* Build configuration list for PBXProject "SubmitTransition" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = B0FAC84F1B7356F30034E00B;
productRefGroup = B0FAC8591B7356F30034E00B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B0FAC8571B7356F30034E00B /* SubmitTransition */,
B0FAC86C1B7356F40034E00B /* SubmitTransitionTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B0FAC8561B7356F30034E00B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B0FAC8631B7356F40034E00B /* Main.storyboard in Resources */,
B0FAC8681B7356F40034E00B /* LaunchScreen.xib in Resources */,
B0FAC8651B7356F40034E00B /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B0FAC86B1B7356F40034E00B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B0FAC8541B7356F30034E00B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B00C1CC21B7495FC00412E02 /* SecondViewController.swift in Sources */,
B0FAC8891B744FB10034E00B /* SpinerLayer.swift in Sources */,
B0FAC88B1B747F990034E00B /* FadeTransition.swift in Sources */,
B0FAC8601B7356F40034E00B /* ViewController.swift in Sources */,
B0FAC8871B7440190034E00B /* CGRectEx.swift in Sources */,
B0FAC85E1B7356F40034E00B /* AppDelegate.swift in Sources */,
B0FAC8851B736C460034E00B /* TimerEx.swift in Sources */,
B0FAC87F1B7359000034E00B /* TransitionSubmitButton.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B0FAC8691B7356F40034E00B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B0FAC8741B7356F40034E00B /* SubmitTransitionTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
B0FAC86F1B7356F40034E00B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B0FAC8571B7356F30034E00B /* SubmitTransition */;
targetProxy = B0FAC86E1B7356F40034E00B /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
B0FAC8611B7356F40034E00B /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
B0FAC8621B7356F40034E00B /* Base */,
);
name = Main.storyboard;
sourceTree = "";
};
B0FAC8661B7356F40034E00B /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
B0FAC8671B7356F40034E00B /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
B0FAC8751B7356F40034E00B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B0FAC8761B7356F40034E00B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
B0FAC8781B7356F40034E00B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = SubmitTransition/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.twitter.tk-365.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
B0FAC8791B7356F40034E00B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = SubmitTransition/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.twitter.tk-365.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
B0FAC87B1B7356F40034E00B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = SubmitTransitionTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.twitter.tk-365.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SubmitTransition.app/SubmitTransition";
};
name = Debug;
};
B0FAC87C1B7356F40034E00B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = SubmitTransitionTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.twitter.tk-365.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SubmitTransition.app/SubmitTransition";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
B0FAC8531B7356F30034E00B /* Build configuration list for PBXProject "SubmitTransition" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B0FAC8751B7356F40034E00B /* Debug */,
B0FAC8761B7356F40034E00B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B0FAC8771B7356F40034E00B /* Build configuration list for PBXNativeTarget "SubmitTransition" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B0FAC8781B7356F40034E00B /* Debug */,
B0FAC8791B7356F40034E00B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B0FAC87A1B7356F40034E00B /* Build configuration list for PBXNativeTarget "SubmitTransitionTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B0FAC87B1B7356F40034E00B /* Debug */,
B0FAC87C1B7356F40034E00B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B0FAC8501B7356F30034E00B /* Project object */;
}
================================================
FILE: SubmitTransition.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: SubmitTransition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: SubmitTransitionTests/Info.plist
================================================
CFBundleDevelopmentRegion
en
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
BNDL
CFBundleShortVersionString
1.0
CFBundleSignature
????
CFBundleVersion
1
================================================
FILE: SubmitTransitionTests/SubmitTransitionTests.swift
================================================
//
// SubmitTransitionTests.swift
// SubmitTransitionTests
//
// Created by Takuya Okamoto on 2015/08/06.
// Copyright (c) 2015年 Uniface. All rights reserved.
//
import UIKit
import XCTest
class SubmitTransitionTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure() {
// Put the code you want to measure the time of here.
}
}
}
================================================
FILE: TKSubmitTransition.podspec
================================================
#
# Be sure to run `pod spec lint TKSubmitTransition.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "TKSubmitTransition"
s.version = "3.1.1"
s.summary = "Animated UIButton of Loading Animation and Transition Animation. Inspired by https://dribbble.com/shots/1945593-Login-Home-Screen"
# s.description = <<-DESC
# Animated UIButton of Loading Animation and Transition Animation. Inspired by https://dribbble.com/shots/1945593-Login-Home-Screen
# DESC
s.homepage = "https://github.com/entotsu/TKSubmitTransition"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
# s.license = "MIT (example)"
s.license = { :type => "MIT", :file => "LICENSE" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = { "Takuya.Okamoto" => "blackn.red42@gmail.com" }
# Or just: s.author = "Takuya.Okamoto"
# s.authors = { "Takuya.Okamoto" => "blackn.red42@gmail.com" }
# s.social_media_url = "http://twitter.com/Takuya.Okamoto"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
# s.platform = :ios
s.platform = :ios, "8.0"
# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/entotsu/TKSubmitTransition.git", :tag => s.version.to_s }
s.swift_version = '5.0'
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source_files = "Classes", "SubmitTransition/Classes/*.swift"
# s.exclude_files = "Classes/Exclude"
# s.public_header_files = "Classes/**/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
# s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"
end