Skip to content

Commit

Permalink
Merge pull request #6 from xmartlabs/version_2_0_0
Browse files Browse the repository at this point in the history
Version 2.0.0. Added support for Xcode 7.3 and swift 2.2.
  • Loading branch information
Martin Barreto committed Mar 22, 2016
2 parents 4c67aaf + 355c855 commit cbc47b3
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 39 deletions.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Before submitting issues ...

- Make sure you are using XLActionController [latest release](https://github.com/xmartlabs/XLActionController/releases) or master branch version.
- Make sure your Xcode version is the latest stable one.
- 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".

When submitting issues, please provide the following information to help maintainers to fix the problem faster:

- Environment: XLActionController, Xcode and iOS version you are using.
- In case of reporting errors, provide Xcode console output of stack trace or code compilation error.
- Any other additional detail such as example code that you think it would be useful to understand, reproduce and solve the problem.
Empty file.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode7.3
env:
- DESTINATION="OS=9.2,name=iPhone 6" SCHEME="XLActionController" SDK=iphonesimulator9.2
- DESTINATION="OS=9.3,name=iPhone 6s" SCHEME="XLActionController" SDK=iphonesimulator9.3
before_install:
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
script:
Expand Down
2 changes: 1 addition & 1 deletion Example/CustomActionControllers/Skype.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public class SkypeActionController: ActionController<SkypeCell, String, UICollec

private func startAnimation() {
if displayLink == nil {
self.displayLink = CADisplayLink(target: self, selector: "update:")
self.displayLink = CADisplayLink(target: self, selector: #selector(SkypeActionController.update(_:)))
self.displayLink.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSDefaultRunLoopMode)
}
animationCount += 1
Expand Down
28 changes: 4 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img src="https://img.shields.io/badge/platform-iOS-blue.svg?style=flat" alt="Platform iOS" />
<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>
<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/badge/pod-1.0.0-blue.svg" alt="CocoaPods compatible" /></a>
<a href="https://cocoapods.org/pods/XLActionController"><img src="https://img.shields.io/badge/pod-2.0.0-blue.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>
</p>
Expand Down Expand Up @@ -383,7 +383,7 @@ After the dismissal animation completes, `dismissView` calls `onDidDismissView`
## Requirements

* iOS 8.0+
* Xcode 7.0+
* Xcode 7.3+

## Getting involved

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

```
github "xmartlabs/XLActionController" ~> 1.0
github "xmartlabs/XLActionController" ~> 2.0
```

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

## License

The MIT License (MIT)

Copyright (c) 2015-2016 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
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.
XLActionController is released under [MIT license](https://raw.githubusercontent.com/xmartlabs/XLActionController/master/LICENSE) and copyrighted by Xmartlabs SRL.
19 changes: 11 additions & 8 deletions Source/ActionController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ public class ActionController<ActionViewType: UICollectionViewCell, ActionDataTy
collectionView.scrollEnabled = self.settings.behavior.scrollEnabled
collectionView.showsVerticalScrollIndicator = false
if self.settings.behavior.hideOnTap {
let tapRecognizer = UITapGestureRecognizer(target: self, action: "tapGestureDidRecognize:")
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(ActionController.tapGestureDidRecognize(_:)))
collectionView.backgroundView = UIView(frame: collectionView.bounds)
collectionView.backgroundView?.userInteractionEnabled = true
collectionView.backgroundView?.addGestureRecognizer(tapRecognizer)
}
if self.settings.behavior.hideOnScrollDown && !self.settings.behavior.scrollEnabled {
let swipeGesture = UISwipeGestureRecognizer(target: self, action: "swipeGestureDidRecognize:")
let swipeGesture = UISwipeGestureRecognizer(target: self, action: #selector(ActionController.swipeGestureDidRecognize(_:)))
swipeGesture.direction = .Down
collectionView.addGestureRecognizer(swipeGesture)
}
Expand Down Expand Up @@ -266,7 +266,7 @@ public class ActionController<ActionViewType: UICollectionViewCell, ActionDataTy
cancel.backgroundColor = settings.cancelView.backgroundColor
let cancelButton: UIButton = {
let cancelButton = UIButton(frame: CGRectMake(0, 0, 100, settings.cancelView.height))
cancelButton.addTarget(self, action: "cancelButtonDidTouch:", forControlEvents: .TouchUpInside)
cancelButton.addTarget(self, action: #selector(ActionController.cancelButtonDidTouch(_:)), forControlEvents: .TouchUpInside)
cancelButton.setTitle(settings.cancelView.title, forState: .Normal)
cancelButton.translatesAutoresizingMaskIntoConstraints = false
return cancelButton
Expand Down Expand Up @@ -644,11 +644,14 @@ public class DynamicsActionController<ActionViewType: UICollectionViewCell, Acti
public override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)

for sectionIndex in 0..<_sections.count {
var rowIndex = 0
let indexPaths = _sections[sectionIndex].actions.map { _ in return NSIndexPath(forRow: rowIndex++, inSection: sectionIndex) }
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.3 * Double(sectionIndex) * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {
self._dynamicSectionIndex = sectionIndex
for (index, section) in _sections.enumerate() {
var rowIndex = -1
let indexPaths = section.actions.map({ _ -> NSIndexPath in
rowIndex += 1
return NSIndexPath(forRow: rowIndex, inSection: index)
})
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.3 * Double(index) * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {
self._dynamicSectionIndex = index
self.collectionView.performBatchUpdates({
if indexPaths.count > 0 {
self.collectionView.insertItemsAtIndexPaths(indexPaths)
Expand Down
2 changes: 1 addition & 1 deletion 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>1.0</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion XLActionController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'XLActionController'
spec.version = '1.0.0'
spec.version = '2.0.0'
spec.license = 'MIT'
spec.summary = 'Fully customizable and extensible action sheet controller written in Swift 2'
spec.homepage = 'https://github.com/xmartlabs/XLActionController'
Expand Down
4 changes: 2 additions & 2 deletions XLActionController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -321,7 +321,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down

0 comments on commit cbc47b3

Please sign in to comment.