ProgressBar Changes
This commit is contained in:
parent
145cafbc30
commit
a95456edff
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public class ProgressBar: UIProgressView {
|
||||
public class ProgressBar: UIProgressView, MVMCoreUIMoleculeViewProtocol {
|
||||
|
||||
var isRounded = Bool()
|
||||
var thickness : Float = 0.0 {
|
||||
@ -16,7 +16,7 @@ public class ProgressBar: UIProgressView {
|
||||
heightAnchor.constraint(equalToConstant: CGFloat(newValue)).isActive = true
|
||||
switch isRounded {
|
||||
case true:
|
||||
layer.cornerRadius = CGFloat((newValue ?? Float(0.0))/2)
|
||||
layer.cornerRadius = CGFloat(newValue/2)
|
||||
clipsToBounds = true
|
||||
default:
|
||||
progressViewStyle = .bar
|
||||
@ -24,7 +24,7 @@ public class ProgressBar: UIProgressView {
|
||||
}
|
||||
}
|
||||
|
||||
open func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: DelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
open func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: DelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
isRounded = json?.optionalBoolForKey("roundedRect") ?? false
|
||||
thickness = json?.floatFromStringForKey("thickness") ?? Float(0.0)
|
||||
let percentage = json?.floatFromStringForKey("percent")
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
@"caretButton": CaretButton.class,
|
||||
@"textField" : MFTextField.class,
|
||||
@"checkbox" : MVMCoreUICheckBox.class,
|
||||
@"progressbar" : ProgressBarView.class
|
||||
@"progressBarView" : ProgressBarView.class,
|
||||
@"progressBar": ProgressBar.class
|
||||
} mutableCopy];
|
||||
});
|
||||
return mapping;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user