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 {
/**
:name: leftButtons
*/
open var leftButtons = [UIButton]() {
open var leftButtons = [UIView]() {
didSet {
reloadView()
}
......@@ -201,7 +201,7 @@ open class Card: PulseView {
/**
:name: rightButtons
*/
open var rightButtons = [UIButton]() {
open var rightButtons = [UIView]() {
didSet {
reloadView()
}
......@@ -231,7 +231,7 @@ open class Card: PulseView {
/**
: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)
prepareProperties(image: image, titleLabel: titleLabel, contentView: contentView, leftButtons: leftButtons, rightButtons: rightButtons)
}
......@@ -417,7 +417,7 @@ open class Card: PulseView {
/**
: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.titleLabel = titleLabel
self.contentView = contentView
......
......@@ -273,7 +273,7 @@ open class ImageCard: PulseView {
/**
:name: leftButtons
*/
open var leftButtons = [UIButton]() {
open var leftButtons = [UIView]() {
didSet {
reloadView()
}
......@@ -301,7 +301,7 @@ open class ImageCard: PulseView {
/**
:name: rightButtons
*/
open var rightButtons = [UIButton]() {
open var rightButtons = [UIView]() {
didSet {
reloadView()
}
......@@ -331,7 +331,7 @@ open class ImageCard: PulseView {
/**
: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)
prepareProperties(image: image, titleLabel: titleLabel, contentView: contentView, leftButtons: leftButtons, rightButtons: rightButtons)
}
......@@ -577,7 +577,7 @@ open class ImageCard: PulseView {
/**
: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.titleLabel = titleLabel
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