Commit f1d6b1d1 by Daniel Dahan

development: temporary solution until rework is in for Card and ImageCard to…

development: temporary solution until rework is in for Card and ImageCard to accept UIViews rather than UIButtons for leftButtons and rightButtons properties
parent 62bb56cd
...@@ -174,7 +174,7 @@ open class Card: PulseView { ...@@ -174,7 +174,7 @@ open class Card: PulseView {
/** /**
:name: leftButtons :name: leftButtons
*/ */
open var leftButtons = [UIButton]() { open var leftButtons = [UIView]() {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -201,7 +201,7 @@ open class Card: PulseView { ...@@ -201,7 +201,7 @@ open class Card: PulseView {
/** /**
:name: rightButtons :name: rightButtons
*/ */
open var rightButtons = [UIButton]() { open var rightButtons = [UIView]() {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -231,7 +231,7 @@ open class Card: PulseView { ...@@ -231,7 +231,7 @@ open class Card: PulseView {
/** /**
:name: init :name: init
*/ */
public convenience init?(image: UIImage? = nil, titleLabel: UILabel? = nil, contentView: UIView? = nil, leftButtons: [UIButton]? = nil, rightButtons: [UIButton]? = nil) { public convenience init?(image: UIImage? = nil, titleLabel: UILabel? = nil, contentView: UIView? = nil, leftButtons: [UIView]? = nil, rightButtons: [UIView]? = nil) {
self.init(frame: .zero) self.init(frame: .zero)
prepareProperties(image: image, titleLabel: titleLabel, contentView: contentView, leftButtons: leftButtons, rightButtons: rightButtons) prepareProperties(image: image, titleLabel: titleLabel, contentView: contentView, leftButtons: leftButtons, rightButtons: rightButtons)
} }
...@@ -417,7 +417,7 @@ open class Card: PulseView { ...@@ -417,7 +417,7 @@ open class Card: PulseView {
/** /**
:name: prepareProperties :name: prepareProperties
*/ */
internal func prepareProperties(image: UIImage?, titleLabel: UILabel?, contentView: UIView?, leftButtons: [UIButton]?, rightButtons: [UIButton]?) { internal func prepareProperties(image: UIImage?, titleLabel: UILabel?, contentView: UIView?, leftButtons: [UIView]?, rightButtons: [UIView]?) {
self.image = image self.image = image
self.titleLabel = titleLabel self.titleLabel = titleLabel
self.contentView = contentView self.contentView = contentView
......
...@@ -273,7 +273,7 @@ open class ImageCard: PulseView { ...@@ -273,7 +273,7 @@ open class ImageCard: PulseView {
/** /**
:name: leftButtons :name: leftButtons
*/ */
open var leftButtons = [UIButton]() { open var leftButtons = [UIView]() {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -301,7 +301,7 @@ open class ImageCard: PulseView { ...@@ -301,7 +301,7 @@ open class ImageCard: PulseView {
/** /**
:name: rightButtons :name: rightButtons
*/ */
open var rightButtons = [UIButton]() { open var rightButtons = [UIView]() {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -331,7 +331,7 @@ open class ImageCard: PulseView { ...@@ -331,7 +331,7 @@ open class ImageCard: PulseView {
/** /**
:name: init :name: init
*/ */
public convenience init?(image: UIImage? = nil, titleLabel: UILabel? = nil, contentView: UIView? = nil, leftButtons: [UIButton]? = nil, rightButtons: [UIButton]? = nil) { public convenience init?(image: UIImage? = nil, titleLabel: UILabel? = nil, contentView: UIView? = nil, leftButtons: [UIView]? = nil, rightButtons: [UIView]? = nil) {
self.init(frame: .zero) self.init(frame: .zero)
prepareProperties(image: image, titleLabel: titleLabel, contentView: contentView, leftButtons: leftButtons, rightButtons: rightButtons) prepareProperties(image: image, titleLabel: titleLabel, contentView: contentView, leftButtons: leftButtons, rightButtons: rightButtons)
} }
...@@ -577,7 +577,7 @@ open class ImageCard: PulseView { ...@@ -577,7 +577,7 @@ open class ImageCard: PulseView {
/** /**
:name: prepareProperties :name: prepareProperties
*/ */
internal func prepareProperties(image: UIImage?, titleLabel: UILabel?, contentView: UIView?, leftButtons: [UIButton]?, rightButtons: [UIButton]?) { internal func prepareProperties(image: UIImage?, titleLabel: UILabel?, contentView: UIView?, leftButtons: [UIView]?, rightButtons: [UIView]?) {
self.image = image self.image = image
self.titleLabel = titleLabel self.titleLabel = titleLabel
self.contentView = contentView self.contentView = contentView
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment