Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 76ad9f1828 | |||
| e042cb52c6 | |||
| d239f5d3c8 | |||
| 57d64c3f48 | |||
| d88128933a | |||
| 2423fa9bbf | |||
| 1b029ff382 | |||
| 83e1a11bef | |||
| 8a62e44836 | |||
| c6445f9735 |
+1
-1
@@ -1,4 +1,4 @@
|
||||
osx_image: xcode7.3
|
||||
osx_image: xcode8
|
||||
language: objective-c
|
||||
|
||||
xcode_project: CircleMenu.xcodeproj
|
||||
|
||||
+2
-3
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
[](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 we’ll 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)]
|
||||
|
||||
[](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`:
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user