Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into feature/conic_wheel
This commit is contained in:
commit
1094df4cba
@ -45,6 +45,7 @@
|
||||
if let selectedIndex = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) {
|
||||
self.selectedIndex = selectedIndex
|
||||
}
|
||||
baseValue = options.indices.contains(selectedIndex) ? options[selectedIndex] : nil
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
|
||||
@ -323,6 +323,9 @@ import UIKit
|
||||
case .email:
|
||||
textField.keyboardType = .emailAddress
|
||||
|
||||
case .phone:
|
||||
textField.keyboardType = .phonePad
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
case number
|
||||
case email
|
||||
case text
|
||||
case phone
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -11,7 +11,7 @@ import UIKit
|
||||
@objcMembers open class Wheel: View, MVMCoreUIViewConstrainingProtocol {
|
||||
|
||||
var heightConstraint: NSLayoutConstraint?
|
||||
var gradientLayer: CALayer?
|
||||
weak var gradientLayer: CALayer?
|
||||
var graphModel: WheelModel? {
|
||||
return model as? WheelModel
|
||||
}
|
||||
@ -193,20 +193,9 @@ import UIKit
|
||||
rotation.timingFunction = CAMediaTimingFunction(name: .linear)
|
||||
rotation.fillMode = .both
|
||||
rotation.isRemovedOnCompletion = false
|
||||
rotation.repeatCount = Float.greatestFiniteMagnitude
|
||||
|
||||
//avoid infinity animation take high CPU momery usage when layer is not displayed
|
||||
rotation.delegate = self
|
||||
rotation.repeatCount = 1
|
||||
self.gradientLayer?.add(rotation, forKey: "rotation")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension Wheel: CAAnimationDelegate {
|
||||
public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
|
||||
if let object = graphModel {
|
||||
rotationAnimation(object)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user