Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeMatt committed Oct 15, 2018
1 parent 57cda5a commit d83b5f4
Show file tree
Hide file tree
Showing 46 changed files with 6,730 additions and 2,275 deletions.
2 changes: 1 addition & 1 deletion Carthage/Checkouts/XLActionController/.swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.2
4 changes: 2 additions & 2 deletions Carthage/Checkouts/XLActionController/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: objective-c
osx_image: xcode9.2
osx_image: xcode10
env:
- DESTINATION="OS=11.2,name=iPhone 8" SCHEME="XLActionController" SDK=iphonesimulator
- DESTINATION="OS=12.0,name=iPhone 8" SCHEME="XLActionController" SDK=iphonesimulator
before_install:
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
script:
Expand Down
4 changes: 4 additions & 0 deletions Carthage/Checkouts/XLActionController/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

### [4.1.0](https://github.com/xmartlabs/XLActionController/releases/tag/4.1.0)

* Swift 4.2 source compability.

### [4.0.1](https://github.com/xmartlabs/XLActionController/releases/tag/4.0.1)

* Bug fixes and stability improvements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,17 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = Xmartlabs;
TargetAttributes = {
28B3B8551BFA7EEC007337A2 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
ProvisioningStyle = Manual;
};
28B3B8691BFA7EEC007337A2 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
TestTargetID = 28B3B8551BFA7EEC007337A2;
};
};
Expand Down Expand Up @@ -435,12 +435,14 @@
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;
Expand Down Expand Up @@ -487,12 +489,14 @@
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;
Expand All @@ -516,6 +520,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -533,7 +538,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -549,7 +554,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -563,7 +568,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.ExampleUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = Example;
USES_XCTRUNNER = YES;
};
Expand All @@ -578,7 +583,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.ExampleUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_TARGET_NAME = Example;
USES_XCTRUNNER = YES;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -56,7 +55,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ open class SkypeActionController: ActionController<SkypeCell, String, UICollecti

collectionView.clipsToBounds = false
collectionView.addSubview(contextView)
collectionView.sendSubview(toBack: contextView)
collectionView.sendSubviewToBack(contextView)

normalAnimationRect = UIView(frame: CGRect(x: 0, y: view.bounds.height / 2, width: 30, height: 30))
normalAnimationRect.isHidden = true
Expand Down Expand Up @@ -130,7 +130,7 @@ open class SkypeActionController: ActionController<SkypeCell, String, UICollecti
let initTime = 0.1
let animationDuration = settings.animation.present.duration - 0.1

let options: UIViewAnimationOptions = [.curveEaseOut, .allowUserInteraction]
let options: UIView.AnimationOptions = [.curveEaseOut, .allowUserInteraction]
UIView.animate(withDuration: initTime, delay: settings.animation.present.delay, options: options, animations: { [weak self] in
guard let me = self else {
return
Expand Down Expand Up @@ -223,8 +223,8 @@ open class SkypeActionController: ActionController<SkypeCell, String, UICollecti
let normalRectLayer = normalAnimationRect.layer.presentation()
let springRectLayer = springAnimationRect.layer.presentation()

guard let normalRectFrame = (normalRectLayer?.value(forKey: "frame") as AnyObject).cgRectValue,
let springRectFrame = (springRectLayer?.value(forKey: "frame") as AnyObject).cgRectValue else {
guard let normalRectFrame = normalRectLayer?.frame,
let springRectFrame = springRectLayer?.frame else {
return
}
contextView.diff = normalRectFrame.origin.y - springRectFrame.origin.y
Expand All @@ -234,7 +234,7 @@ open class SkypeActionController: ActionController<SkypeCell, String, UICollecti
fileprivate func startAnimation() {
if displayLink == nil {
self.displayLink = CADisplayLink(target: self, selector: #selector(SkypeActionController.update(_:)))
self.displayLink.add(to: RunLoop.main, forMode: RunLoopMode.defaultRunLoopMode)
self.displayLink.add(to: RunLoop.main, forMode: RunLoop.Mode.default)
}
animationCount += 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ open class SpotifyHeaderView: UICollectionReusableView {

let views = [ "ico": imageView, "title": title, "artist": artist, "separator": separator ]
let metrics = [ "icow": 54, "icoh": 54 ]
let options = NSLayoutFormatOptions()
let options = NSLayoutConstraint.FormatOptions()

addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|-15-[ico(icow)]-10-[title]-15-|", options: options, metrics: metrics, views: views))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[separator]|", options: options, metrics: metrics, views: views))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ open class TwitterActionControllerHeader: UICollectionReusableView {
super.init(frame: frame)
backgroundColor = .white
addSubview(label)
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[label]|", options: NSLayoutFormatOptions(), metrics: nil, views: ["label": label]))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[label]|", options: NSLayoutFormatOptions(), metrics: nil, views: ["label": label]))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[label]|", options: NSLayoutConstraint.FormatOptions(), metrics: nil, views: ["label": label]))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[label]|", options: NSLayoutConstraint.FormatOptions(), metrics: nil, views: ["label": label]))
addSubview(bottomLine)
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:[line(1)]|", options: NSLayoutFormatOptions(), metrics: nil, views: ["line": bottomLine]))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[line]|", options: NSLayoutFormatOptions(), metrics: nil, views: ["line": bottomLine]))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:[line(1)]|", options: NSLayoutConstraint.FormatOptions(), metrics: nil, views: ["line": bottomLine]))
addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[line]|", options: NSLayoutConstraint.FormatOptions(), metrics: nil, views: ["line": bottomLine]))
}

required public init?(coder aDecoder: NSCoder) {
Expand Down Expand Up @@ -127,7 +127,7 @@ open class TwitterActionController: ActionController<TwitterCell, ActionData, Tw

collectionView.clipsToBounds = false
collectionView.addSubview(hideBottomSpaceView)
collectionView.sendSubview(toBack: hideBottomSpaceView)
collectionView.sendSubviewToBack(hideBottomSpaceView)
}

@available(iOS 11, *)
Expand All @@ -148,7 +148,7 @@ open class TwitterActionController: ActionController<TwitterCell, ActionData, Tw
delay: 0,
usingSpringWithDamping: animationSettings.damping,
initialSpringVelocity: animationSettings.springVelocity,
options: UIViewAnimationOptions.curveEaseIn,
options: UIView.AnimationOptions.curveEaseIn,
animations: { [weak self] in
presentingView.transform = CGAffineTransform.identity
self?.performCustomDismissingAnimation(presentedView, presentingView: presentingView)
Expand Down
2 changes: 1 addition & 1 deletion Carthage/Checkouts/XLActionController/Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.0.0</string>
<string>4.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Carthage/Checkouts/XLActionController/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 XMARTLABS (http://xmartlabs.com)
Copyright (c) 2018 XMARTLABS (http://xmartlabs.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Carthage/Checkouts/XLActionController/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible" /></a>
<a href="https://cocoapods.org/pods/XLActionController"><img src="https://img.shields.io/cocoapods/v/XLActionController.svg" alt="CocoaPods compatible" /></a>
<a href="https://raw.githubusercontent.com/xmartlabs/XLActionController/master/LICENSE"><img src="http://img.shields.io/badge/license-MIT-blue.svg?style=flat" alt="License: MIT" /></a>
<a href="https://codebeat.co/projects/github-com-xmartlabs-xlactioncontroller"><img alt="codebeat badge" src="https://codebeat.co/badges/24f48197-136d-44cc-b072-6703644d13b6" /></a>
<!-- <a href="https://codebeat.co/projects/github-com-xmartlabs-xlactioncontroller"><img alt="codebeat badge" src="https://codebeat.co/badges/24f48197-136d-44cc-b072-6703644d13b6" /></a> -->
</p>

By [XMARTLABS](http://xmartlabs.com).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,19 @@ open class ActionController<ActionViewType: UICollectionViewCell, ActionDataType
if let headerSpec = headerSpec, let _ = headerData {
switch headerSpec {
case .cellClass:
collectionView.register(HeaderViewType.self, forSupplementaryViewOfKind:UICollectionElementKindSectionHeader, withReuseIdentifier: ReusableViewIds.Header.rawValue)
collectionView.register(HeaderViewType.self, forSupplementaryViewOfKind:UICollectionView.elementKindSectionHeader, withReuseIdentifier: ReusableViewIds.Header.rawValue)
case .nibFile(let nibName, let bundle, _):
collectionView.register(UINib(nibName: nibName, bundle: bundle), forSupplementaryViewOfKind:UICollectionElementKindSectionHeader, withReuseIdentifier: ReusableViewIds.Header.rawValue)
collectionView.register(UINib(nibName: nibName, bundle: bundle), forSupplementaryViewOfKind:UICollectionView.elementKindSectionHeader, withReuseIdentifier: ReusableViewIds.Header.rawValue)
}
}

// register section header
if let headerSpec = sectionHeaderSpec {
switch headerSpec {
case .cellClass:
collectionView.register(SectionHeaderViewType.self, forSupplementaryViewOfKind:UICollectionElementKindSectionHeader, withReuseIdentifier: ReusableViewIds.SectionHeader.rawValue)
collectionView.register(SectionHeaderViewType.self, forSupplementaryViewOfKind:UICollectionView.elementKindSectionHeader, withReuseIdentifier: ReusableViewIds.SectionHeader.rawValue)
case .nibFile(let nibName, let bundle, _):
collectionView.register(UINib(nibName: nibName, bundle: bundle), forSupplementaryViewOfKind:UICollectionElementKindSectionHeader, withReuseIdentifier: ReusableViewIds.SectionHeader.rawValue)
collectionView.register(UINib(nibName: nibName, bundle: bundle), forSupplementaryViewOfKind:UICollectionView.elementKindSectionHeader, withReuseIdentifier: ReusableViewIds.SectionHeader.rawValue)
}
}

Expand Down Expand Up @@ -363,7 +363,7 @@ open class ActionController<ActionViewType: UICollectionViewCell, ActionDataType

let cancelButton = UIButton(frame: CGRect(x: 0, y: 0, width: 100, height: settings.cancelView.height))
cancelButton.addTarget(self, action: #selector(ActionController.cancelButtonDidTouch(_:)), for: .touchUpInside)
cancelButton.setTitle(settings.cancelView.title, for: UIControlState())
cancelButton.setTitle(settings.cancelView.title, for: UIControl.State())
cancelButton.translatesAutoresizingMaskIntoConstraints = false

cancelView.addSubview(cancelButton)
Expand Down Expand Up @@ -402,7 +402,7 @@ open class ActionController<ActionViewType: UICollectionViewCell, ActionDataType
}

open func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
if kind == UICollectionElementKindSectionHeader {
if kind == UICollectionView.elementKindSectionHeader {
if (indexPath as NSIndexPath).section == 0 && hasHeader() {
let reusableview = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: ReusableViewIds.Header.rawValue, for: indexPath) as? HeaderViewType
onConfigureHeader?(reusableview!, headerData!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public struct ActionControllerSettings {
* A mask of options indicating how you want to perform the animations. Its default value is `UIViewAnimationOptions.CurveEaseOut`.
* @see: animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:
*/
public var options = UIViewAnimationOptions.curveEaseOut
public var options = UIView.AnimationOptions.curveEaseOut
}

/** Struct that contains properties to configure the animation when dismissing the action controller */
Expand Down Expand Up @@ -156,7 +156,7 @@ public struct ActionControllerSettings {
* A mask of options indicating how you want to perform the animations. Its default value is `UIViewAnimationOptions.CurveEaseIn`.
* @see: animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:
*/
public var options = UIViewAnimationOptions.curveEaseIn
public var options = UIView.AnimationOptions.curveEaseIn
/**
* A float value that makes the action controller's to be animated until the bottomof the screen plus this value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ open class DynamicCollectionViewFlowLayout: UICollectionViewFlowLayout {
// MARK: - Properties definition

open var dynamicAnimator: UIDynamicAnimator?
open var itemsAligment = UIControlContentHorizontalAlignment.center
open var itemsAligment = UIControl.ContentHorizontalAlignment.center

open lazy var collisionBehavior: UICollisionBehavior? = {
let collision = UICollisionBehavior(items: [])
Expand Down Expand Up @@ -91,7 +91,7 @@ open class DynamicCollectionViewFlowLayout: UICollectionViewFlowLayout {
}

let items = animator.items(in: rect) as NSArray
return items.flatMap { $0 as? UICollectionViewLayoutAttributes }
return items.compactMap { $0 as? UICollectionViewLayoutAttributes }
}

override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
Expand Down
2 changes: 1 addition & 1 deletion Carthage/Checkouts/XLActionController/Source/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.0.0</string>
<string>4.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'XLActionController'
spec.version = '4.0.1'
spec.version = '4.1.0'
spec.license = 'MIT'
spec.summary = 'Fully customizable and extensible action sheet controller written in Swift'
spec.homepage = 'https://github.com/xmartlabs/XLActionController'
Expand Down
Loading

0 comments on commit d83b5f4

Please sign in to comment.