Compare commits

...

10 Commits

Author SHA1 Message Date
Alex 76ad9f1828 Merge pull request #29 from pdenya/master
remove platform when button is tapped again to close menu
2016-11-21 08:31:58 +02:00
Paul Denya e042cb52c6 remove platform when button is tapped again to close menu 2016-11-19 16:05:58 -05:00
aleksei1000000 d239f5d3c8 Update README.md 2016-10-17 10:02:59 +03:00
Juri Vasylenko 57d64c3f48 Update .travis.yml 2016-10-14 18:14:23 +04:00
aleksei1000000 d88128933a Update README.md 2016-10-14 14:15:15 +03:00
aleksei1000000 2423fa9bbf Update README.md 2016-10-14 14:14:05 +03:00
aleksei1000000 1b029ff382 Update README.md 2016-10-14 14:10:39 +03:00
Alex.k 83e1a11bef updated podspec 2016-10-12 16:45:55 +03:00
Alex.k 8a62e44836 fixed crash when button icon is empty 2016-10-12 15:26:49 +03:00
Alex.k c6445f9735 updated podspect and readme 2016-10-12 14:53:15 +03:00
5 changed files with 31 additions and 13 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
osx_image: xcode7.3
osx_image: xcode8
language: objective-c
xcode_project: CircleMenu.xcodeproj
+2 -3
View File
@@ -1,12 +1,11 @@
Pod::Spec.new do |s|
s.name = 'CircleMenu'
s.version = '1.0.7'
s.version = '2.0.1'
s.summary = 'Amazing animation with buttons'
s.homepage = 'https://github.com/Ramotion/circle-menu'
s.license = 'MIT'
s.authors = { 'Juri Vasylenko' => 'juri.v@ramotion.com' }
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.source = { :git => 'https://github.com/Ramotion/circle-menu.git', :tag => s.version.to_s }
s.source_files = 'CircleMenuLib/**/*.swift'
s.requires_arc = true
end
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
+14 -7
View File
@@ -96,8 +96,8 @@ open class CircleMenu: UIButton {
var buttons: [UIButton]?
weak var platform: UIView?
fileprivate var customNormalIconView: UIImageView!
fileprivate var customSelectedIconView: UIImageView!
fileprivate var customNormalIconView: UIImageView?
fileprivate var customSelectedIconView: UIImageView?
/**
Initializes and returns a circle menu object.
@@ -147,7 +147,7 @@ open class CircleMenu: UIButton {
customSelectedIconView = addCustomImageView(state: .selected)
if customSelectedIconView != nil {
customSelectedIconView.alpha = 0
customSelectedIconView?.alpha = 0
}
setImage(UIImage(), for: UIControlState())
setImage(UIImage(), for: .selected)
@@ -350,6 +350,10 @@ open class CircleMenu: UIButton {
}
if isShow == false { // hide buttons and remove
self.buttons = nil
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + duration) {
if self.platform?.superview != nil { self.platform?.removeFromSuperview() }
}
}
}
@@ -407,10 +411,13 @@ open class CircleMenu: UIButton {
view.layer.add(scale, forKey: nil)
}
if customNormalIconView != nil && customSelectedIconView != nil {
if let customNormalIconView = self.customNormalIconView {
addAnimations(customNormalIconView, !isSelected)
}
if let customSelectedIconView = self.customSelectedIconView {
addAnimations(customSelectedIconView, isSelected)
}
self.isSelected = isSelected
self.alpha = isSelected ? 0.3 : 1
}
@@ -458,10 +465,10 @@ open class CircleMenu: UIButton {
$0.beginTime = CACurrentMediaTime() + delay
}
customNormalIconView.layer.add(rotation, forKey: nil)
customNormalIconView.layer.add(show, forKey: nil)
customNormalIconView?.layer.add(rotation, forKey: nil)
customNormalIconView?.layer.add(show, forKey: nil)
customSelectedIconView.layer.add(fade, forKey: nil)
customSelectedIconView?.layer.add(fade, forKey: nil)
}
}
+4 -2
View File
@@ -9,7 +9,8 @@
[![Travis](https://img.shields.io/travis/Ramotion/circle-menu.svg)](https://travis-ci.org/Ramotion/circle-menu)
## About
This project is maintained by Ramotion, an agency specialized in building dedicated engineering teams and developing custom software.<br><br> [Contact our team](https://business.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=circle-menu-contact-us) and well help you work with the best engineers from Eastern Europe.
This project is maintained by Ramotion, Inc.<br>
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.<br><br>**Looking for developers for your project?** [[▶︎CONTACT OUR TEAM◀︎](http://business.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=circle-menu-contact-us/#Get_in_Touch)]
[![preview](./preview.gif)](https://dribbble.com/shots/2534780-Circle-Menu-Swift-Open-Source)
@@ -28,7 +29,8 @@ Just add CircleMenuLib folder to your project.
or use [CocoaPods](https://cocoapods.org) with Podfile:
```ruby
pod 'CircleMenu', '~> 1.0.0'
pod 'CircleMenu', '~> 2.0.1' swift 3
pod 'CircleMenu', '~> 1.0.7' swift 2
```
or [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:
```