Skip to content

Commit cbc47b3

Browse files
author
Martin Barreto
committed
Merge pull request #6 from xmartlabs/version_2_0_0
Version 2.0.0. Added support for Xcode 7.3 and swift 2.2.
2 parents 4c67aaf + 355c855 commit cbc47b3

File tree

9 files changed

+33
-39
lines changed

9 files changed

+33
-39
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Before submitting issues ...
2+
3+
- Make sure you are using XLActionController [latest release](https://github.com/xmartlabs/XLActionController/releases) or master branch version.
4+
- Make sure your Xcode version is the latest stable one.
5+
- Check if the issue was [already reported or fixed](https://github.com/xmartlabs/XLActionController/issues?utf8=%E2%9C%93&q=is%3Aissue). We add labels to each issue in order to easily find related issues. If you found a match add a brief comment "I have the same problem" or "+1".
6+
7+
When submitting issues, please provide the following information to help maintainers to fix the problem faster:
8+
9+
- Environment: XLActionController, Xcode and iOS version you are using.
10+
- In case of reporting errors, provide Xcode console output of stack trace or code compilation error.
11+
- Any other additional detail such as example code that you think it would be useful to understand, reproduce and solve the problem.

.github/PULL_REQUEST_TEMPLATE.md

Whitespace-only changes.

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: objective-c
2-
osx_image: xcode7.2
2+
osx_image: xcode7.3
33
env:
4-
- DESTINATION="OS=9.2,name=iPhone 6" SCHEME="XLActionController" SDK=iphonesimulator9.2
4+
- DESTINATION="OS=9.3,name=iPhone 6s" SCHEME="XLActionController" SDK=iphonesimulator9.3
55
before_install:
66
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
77
script:

Example/CustomActionControllers/Skype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public class SkypeActionController: ActionController<SkypeCell, String, UICollec
214214

215215
private func startAnimation() {
216216
if displayLink == nil {
217-
self.displayLink = CADisplayLink(target: self, selector: "update:")
217+
self.displayLink = CADisplayLink(target: self, selector: #selector(SkypeActionController.update(_:)))
218218
self.displayLink.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSDefaultRunLoopMode)
219219
}
220220
animationCount += 1

README.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img src="https://img.shields.io/badge/platform-iOS-blue.svg?style=flat" alt="Platform iOS" />
66
<a href="https://developer.apple.com/swift"><img src="https://img.shields.io/badge/swift2-compatible-4BC51D.svg?style=flat" alt="Swift 2 compatible" /></a>
77
<a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible" /></a>
8-
<a href="https://cocoapods.org/pods/XLActionController"><img src="https://img.shields.io/badge/pod-1.0.0-blue.svg" alt="CocoaPods compatible" /></a>
8+
<a href="https://cocoapods.org/pods/XLActionController"><img src="https://img.shields.io/badge/pod-2.0.0-blue.svg" alt="CocoaPods compatible" /></a>
99
<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>
1010
<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>
1111
</p>
@@ -383,7 +383,7 @@ After the dismissal animation completes, `dismissView` calls `onDidDismissView`
383383
## Requirements
384384

385385
* iOS 8.0+
386-
* Xcode 7.0+
386+
* Xcode 7.3+
387387

388388
## Getting involved
389389

@@ -435,7 +435,7 @@ dependency manager for Cocoa.
435435
Specify XLActionController into your project's Carthage:
436436

437437
```
438-
github "xmartlabs/XLActionController" ~> 1.0
438+
github "xmartlabs/XLActionController" ~> 2.0
439439
```
440440

441441
### Manually as Embedded Framework
@@ -467,24 +467,4 @@ Select XLActionController.framework and we are done!
467467

468468
## License
469469

470-
The MIT License (MIT)
471-
472-
Copyright (c) 2015-2016 XMARTLABS (http://xmartlabs.com)
473-
474-
Permission is hereby granted, free of charge, to any person obtaining a copy
475-
of this software and associated documentation files (the "Software"), to deal
476-
in the Software without restriction, including without limitation the rights
477-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
478-
copies of the Software, and to permit persons to whom the Software is
479-
furnished to do so, subject to the following conditions:
480-
481-
The above copyright notice and this permission notice shall be included in all
482-
copies or substantial portions of the Software.
483-
484-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
485-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
486-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
487-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
488-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
489-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
490-
SOFTWARE.
470+
XLActionController is released under [MIT license](https://raw.githubusercontent.com/xmartlabs/XLActionController/master/LICENSE) and copyrighted by Xmartlabs SRL.

Source/ActionController.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ public class ActionController<ActionViewType: UICollectionViewCell, ActionDataTy
129129
collectionView.scrollEnabled = self.settings.behavior.scrollEnabled
130130
collectionView.showsVerticalScrollIndicator = false
131131
if self.settings.behavior.hideOnTap {
132-
let tapRecognizer = UITapGestureRecognizer(target: self, action: "tapGestureDidRecognize:")
132+
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(ActionController.tapGestureDidRecognize(_:)))
133133
collectionView.backgroundView = UIView(frame: collectionView.bounds)
134134
collectionView.backgroundView?.userInteractionEnabled = true
135135
collectionView.backgroundView?.addGestureRecognizer(tapRecognizer)
136136
}
137137
if self.settings.behavior.hideOnScrollDown && !self.settings.behavior.scrollEnabled {
138-
let swipeGesture = UISwipeGestureRecognizer(target: self, action: "swipeGestureDidRecognize:")
138+
let swipeGesture = UISwipeGestureRecognizer(target: self, action: #selector(ActionController.swipeGestureDidRecognize(_:)))
139139
swipeGesture.direction = .Down
140140
collectionView.addGestureRecognizer(swipeGesture)
141141
}
@@ -266,7 +266,7 @@ public class ActionController<ActionViewType: UICollectionViewCell, ActionDataTy
266266
cancel.backgroundColor = settings.cancelView.backgroundColor
267267
let cancelButton: UIButton = {
268268
let cancelButton = UIButton(frame: CGRectMake(0, 0, 100, settings.cancelView.height))
269-
cancelButton.addTarget(self, action: "cancelButtonDidTouch:", forControlEvents: .TouchUpInside)
269+
cancelButton.addTarget(self, action: #selector(ActionController.cancelButtonDidTouch(_:)), forControlEvents: .TouchUpInside)
270270
cancelButton.setTitle(settings.cancelView.title, forState: .Normal)
271271
cancelButton.translatesAutoresizingMaskIntoConstraints = false
272272
return cancelButton
@@ -644,11 +644,14 @@ public class DynamicsActionController<ActionViewType: UICollectionViewCell, Acti
644644
public override func viewDidAppear(animated: Bool) {
645645
super.viewDidAppear(animated)
646646

647-
for sectionIndex in 0..<_sections.count {
648-
var rowIndex = 0
649-
let indexPaths = _sections[sectionIndex].actions.map { _ in return NSIndexPath(forRow: rowIndex++, inSection: sectionIndex) }
650-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.3 * Double(sectionIndex) * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {
651-
self._dynamicSectionIndex = sectionIndex
647+
for (index, section) in _sections.enumerate() {
648+
var rowIndex = -1
649+
let indexPaths = section.actions.map({ _ -> NSIndexPath in
650+
rowIndex += 1
651+
return NSIndexPath(forRow: rowIndex, inSection: index)
652+
})
653+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.3 * Double(index) * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {
654+
self._dynamicSectionIndex = index
652655
self.collectionView.performBatchUpdates({
653656
if indexPaths.count > 0 {
654657
self.collectionView.insertItemsAtIndexPaths(indexPaths)

Source/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>2.0.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

XLActionController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'XLActionController'
3-
spec.version = '1.0.0'
3+
spec.version = '2.0.0'
44
spec.license = 'MIT'
55
spec.summary = 'Fully customizable and extensible action sheet controller written in Swift 2'
66
spec.homepage = 'https://github.com/xmartlabs/XLActionController'

XLActionController.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
280280
GCC_WARN_UNUSED_FUNCTION = YES;
281281
GCC_WARN_UNUSED_VARIABLE = YES;
282-
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
282+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
283283
MTL_ENABLE_DEBUG_INFO = YES;
284284
ONLY_ACTIVE_ARCH = YES;
285285
SDKROOT = iphoneos;
@@ -321,7 +321,7 @@
321321
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
322322
GCC_WARN_UNUSED_FUNCTION = YES;
323323
GCC_WARN_UNUSED_VARIABLE = YES;
324-
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
324+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
325325
MTL_ENABLE_DEBUG_INFO = NO;
326326
SDKROOT = iphoneos;
327327
TARGETED_DEVICE_FAMILY = "1,2";

0 commit comments

Comments
 (0)