Skip to content

Commit aae4b6f

Browse files
author
Evan Greer
committed
testing without ibinspectables
1 parent df57a67 commit aae4b6f

File tree

1 file changed

+86
-76
lines changed

1 file changed

+86
-76
lines changed

swift-sdk/uicomponents/IterableEmbeddedView.swift

Lines changed: 86 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -293,81 +293,91 @@ public class IterableEmbeddedView:UIView {
293293

294294
public var viewConfig: IterableEmbeddedViewConfig?
295295

296-
// MARK: OOTB View IBInspectables
297-
/// OOTB View Background Color
298-
@IBInspectable public var bannerBackgroundColor: UIColor? = UIColor.white {
299-
didSet {
300-
self.backgroundColor = UIColor.clear
301-
self.innerContentView.backgroundColor = backgroundColor!
302-
}
303-
}
304-
305-
/// Banner Border Color
306-
@IBInspectable public var bannerBorderColor: UIColor = UIColor.clear {
307-
didSet {
308-
self.layer.borderColor = bannerBorderColor.cgColor
309-
}
310-
}
311-
312-
/// Banner Border Width
313-
@IBInspectable public var bannerBorderWidth: CGFloat = 1.0 {
314-
didSet {
315-
self.layer.borderWidth = bannerBorderWidth
316-
}
317-
}
318-
319-
/// Banner Corner Radius
320-
@IBInspectable public var bannerCornerRadius: CGFloat = 8.0 {
321-
didSet {
322-
self.layer.cornerRadius = bannerCornerRadius
323-
contentView.layer.cornerRadius = bannerCornerRadius
324-
innerContentView.layer.cornerRadius = bannerCornerRadius
325-
}
326-
}
327-
328-
// MARK: Primary Button
329-
/// Primary button background color.
330-
@IBInspectable public var primaryBtnColor: UIColor = UIColor.purple {
331-
didSet {
332-
primaryBtn.backgroundColor = primaryBtnColor
333-
}
334-
}
335-
336-
/// Primary button text color.
337-
@IBInspectable public var primaryBtnTextColor: UIColor = UIColor.white {
338-
didSet {
339-
primaryBtn.titleColor = primaryBtnTextColor
340-
}
341-
}
342-
343-
// MARK: Second Button
344-
/// Secondary button background color.
345-
@IBInspectable public var secondaryBtnColor: UIColor = UIColor.clear {
346-
didSet {
347-
secondaryBtn.backgroundColor = secondaryBtnColor
348-
}
349-
}
350-
351-
/// Secondary button text color.
352-
@IBInspectable public var secondaryBtnTextColor: UIColor = UIColor.black {
353-
didSet {
354-
secondaryBtn.titleColor = secondaryBtnTextColor
355-
}
356-
}
357-
358-
/// Title Text Color
359-
@IBInspectable public var titleTextColor: UIColor = UIColor.black {
360-
didSet {
361-
labelTitle.textColor = titleTextColor
362-
}
363-
}
364-
365-
/// Description Text Color
366-
@IBInspectable public var bodyTextColor: UIColor = UIColor.darkGray {
367-
didSet {
368-
labelDescription.textColor = bodyTextColor
369-
}
370-
}
296+
// // MARK: OOTB View IBInspectables
297+
// /// OOTB View Background Color
298+
public var bannerBackgroundColor: UIColor?
299+
// @IBInspectable public var bannerBackgroundColor: UIColor? = UIColor.white {
300+
// didSet {
301+
// self.backgroundColor = UIColor.clear
302+
// self.innerContentView.backgroundColor = backgroundColor!
303+
// }
304+
// }
305+
//
306+
// /// Banner Border Color
307+
public var bannerBorderColor: UIColor
308+
// @IBInspectable public var bannerBorderColor: UIColor = UIColor.clear {
309+
// didSet {
310+
// self.layer.borderColor = bannerBorderColor.cgColor
311+
// }
312+
// }
313+
//
314+
// /// Banner Border Width
315+
public var bannerBorderWidth: CGFloat
316+
// @IBInspectable public var bannerBorderWidth: CGFloat = 1.0 {
317+
// didSet {
318+
// self.layer.borderWidth = bannerBorderWidth
319+
// }
320+
// }
321+
//
322+
// /// Banner Corner Radius
323+
public var bannerCornerRadius: CGFloat
324+
// @IBInspectable public var bannerCornerRadius: CGFloat = 8.0 {
325+
// didSet {
326+
// self.layer.cornerRadius = bannerCornerRadius
327+
// contentView.layer.cornerRadius = bannerCornerRadius
328+
// innerContentView.layer.cornerRadius = bannerCornerRadius
329+
// }
330+
// }
331+
//
332+
// // MARK: Primary Button
333+
// /// Primary button background color.
334+
public var primaryBtnColor: UIColor
335+
// @IBInspectable public var primaryBtnColor: UIColor = UIColor.purple {
336+
// didSet {
337+
// primaryBtn.backgroundColor = primaryBtnColor
338+
// }
339+
// }
340+
//
341+
// /// Primary button text color.
342+
public var primaryBtnTextColor: UIColor
343+
// @IBInspectable public var primaryBtnTextColor: UIColor = UIColor.white {
344+
// didSet {
345+
// primaryBtn.titleColor = primaryBtnTextColor
346+
// }
347+
// }
348+
//
349+
// // MARK: Second Button
350+
// /// Secondary button background color.
351+
public var secondaryBtnColor: UIColor
352+
// @IBInspectable public var secondaryBtnColor: UIColor = UIColor.clear {
353+
// didSet {
354+
// secondaryBtn.backgroundColor = secondaryBtnColor
355+
// }
356+
// }
357+
//
358+
// /// Secondary button text color.
359+
public var secondaryBtnTextColor: UIColor
360+
// @IBInspectable public var secondaryBtnTextColor: UIColor = UIColor.black {
361+
// didSet {
362+
// secondaryBtn.titleColor = secondaryBtnTextColor
363+
// }
364+
// }
365+
//
366+
// /// Title Text Color
367+
public var titleTextColor: UIColor
368+
// @IBInspectable public var titleTextColor: UIColor = UIColor.black {
369+
// didSet {
370+
// labelTitle.textColor = titleTextColor
371+
// }
372+
// }
373+
//
374+
// /// Description Text Color
375+
public var bodyTextColor: UIColor
376+
// @IBInspectable public var bodyTextColor: UIColor = UIColor.darkGray {
377+
// didSet {
378+
// labelDescription.textColor = bodyTextColor
379+
// }
380+
// }
371381

372382
/// Primary button on touchup inside event.
373383
@IBAction public func primaryButtonPressed(_ sender: UIButton) {
@@ -453,7 +463,7 @@ public class IterableEMButton: UIButton {
453463
super.init(coder: coder)
454464
}
455465

456-
@IBInspectable public var isRoundedSides: Bool = false {
466+
@IBInspectable public var isRoundedSides: Bool = true {
457467
didSet {
458468
layoutSubviews()
459469
}

0 commit comments

Comments
 (0)