Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios_sample into vasavk/footnote
This commit is contained in:
commit
5541498dc1
@ -733,7 +733,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = 72;
|
CURRENT_PROJECT_VERSION = 73;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = FCMA4QKS77;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = FCMA4QKS77;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@ -769,7 +769,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = 72;
|
CURRENT_PROJECT_VERSION = 73;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = FCMA4QKS77;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = FCMA4QKS77;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
|||||||
@ -10,15 +10,15 @@ import VDS
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
extension UIView {
|
extension UIView {
|
||||||
public func makeWrapper(edgeSpacing: CGFloat = 0.0, isTrailing: Bool = true) -> View {
|
public func makeWrapper(edgeSpacing: CGFloat = 0.0, isTrailing: Bool = true, isBottom: Bool = false) -> View {
|
||||||
UIView.makeWrapper(for: self, edgeSpacing: edgeSpacing, isTrailing: isTrailing)
|
UIView.makeWrapper(for: self, edgeSpacing: edgeSpacing, isTrailing: isTrailing, isBottom: isBottom)
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func makeWrapper(for view: UIView, edgeSpacing: CGFloat = 0.0, isTrailing: Bool = true) -> View {
|
public static func makeWrapper(for view: UIView, edgeSpacing: CGFloat = 0.0, isTrailing: Bool = true, isBottom: Bool = false) -> View {
|
||||||
makeWrapperWithConstraints(for: view, edgeSpacing: edgeSpacing, isTrailing: isTrailing).view
|
makeWrapperWithConstraints(for: view, edgeSpacing: edgeSpacing, isTrailing: isTrailing, isBottom: isBottom).view
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func makeWrapperWithConstraints(for view: UIView, edgeSpacing: CGFloat = 0.0, isTrailing: Bool = true) -> (view: View, container: NSLayoutConstraint.Container) {
|
public static func makeWrapperWithConstraints(for view: UIView, edgeSpacing: CGFloat = 0.0, isTrailing: Bool = true, isBottom: Bool = false) -> (view: View, container: NSLayoutConstraint.Container) {
|
||||||
let container = NSLayoutConstraint.Container()
|
let container = NSLayoutConstraint.Container()
|
||||||
let wrapper = View().with {
|
let wrapper = View().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
@ -26,7 +26,11 @@ extension UIView {
|
|||||||
wrapper.addSubview(view)
|
wrapper.addSubview(view)
|
||||||
|
|
||||||
container.topConstraint = view.pinTop(anchor: wrapper.topAnchor, constant: edgeSpacing)
|
container.topConstraint = view.pinTop(anchor: wrapper.topAnchor, constant: edgeSpacing)
|
||||||
container.bottomConstraint = view.pinBottom(anchor: wrapper.bottomAnchor, constant: edgeSpacing)
|
if isBottom {
|
||||||
|
container.bottomConstraint = view.pinBottomLessThanOrEqualTo(anchor: wrapper.bottomAnchor, constant: edgeSpacing)
|
||||||
|
} else {
|
||||||
|
container.bottomConstraint = view.pinBottom(anchor: wrapper.bottomAnchor, constant: edgeSpacing)
|
||||||
|
}
|
||||||
container.leadingConstraint = view.pinLeading(anchor: wrapper.leadingAnchor, constant: edgeSpacing)
|
container.leadingConstraint = view.pinLeading(anchor: wrapper.leadingAnchor, constant: edgeSpacing)
|
||||||
if isTrailing {
|
if isTrailing {
|
||||||
container.trailingConstraint = view.pinTrailingLessThanOrEqualTo(anchor: wrapper.trailingAnchor, constant: edgeSpacing)
|
container.trailingConstraint = view.pinTrailingLessThanOrEqualTo(anchor: wrapper.trailingAnchor, constant: edgeSpacing)
|
||||||
|
|||||||
@ -132,18 +132,13 @@ class CarouselViewController: BaseViewController<Carousel> {
|
|||||||
rows.append(Button().with{ $0.use = .secondary; $0.text = "Shop"; $0.onClick = onClick})
|
rows.append(Button().with{ $0.use = .secondary; $0.text = "Shop"; $0.onClick = onClick})
|
||||||
rows.append(Button().with{ $0.use = .secondary; $0.text = "Buy"; $0.onClick = onClick})
|
rows.append(Button().with{ $0.use = .secondary; $0.text = "Buy"; $0.onClick = onClick})
|
||||||
rows.append(Button().with{ $0.use = .secondary; $0.text = "Offer"; $0.onClick = onClick})
|
rows.append(Button().with{ $0.use = .secondary; $0.text = "Offer"; $0.onClick = onClick})
|
||||||
component.views = rows.compactMap({ view in
|
|
||||||
return TileContainer().with { instance in
|
|
||||||
instance.aspectRatio = .none
|
|
||||||
instance.addContentView(view)
|
|
||||||
instance.color = .custom(.lightGray)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
label.text = "0"
|
label.text = "0"
|
||||||
|
|
||||||
component.slotAlignment = .init(vertical: Carousel.Vertical.top, horizontal: Carousel.Horizontal.left)
|
component.slotAlignment = .init(vertical: Carousel.Vertical.top, horizontal: Carousel.Horizontal.left)
|
||||||
horizAlignmtPickerSelectorView.text = Carousel.Horizontal.left.rawValue
|
horizAlignmtPickerSelectorView.text = Carousel.Horizontal.left.rawValue
|
||||||
vertAlignmtPickerSelectorView.text = Carousel.Vertical.top.rawValue
|
vertAlignmtPickerSelectorView.text = Carousel.Vertical.top.rawValue
|
||||||
|
|
||||||
|
updateCarousel()
|
||||||
|
|
||||||
// Callback when moving the carousel. Returns selectedGroupIndex.
|
// Callback when moving the carousel. Returns selectedGroupIndex.
|
||||||
component.onChange = { [weak self] selectedGroupIndex in
|
component.onChange = { [weak self] selectedGroupIndex in
|
||||||
@ -152,6 +147,16 @@ class CarouselViewController: BaseViewController<Carousel> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func updateCarousel() {
|
||||||
|
component.views = rows.compactMap({ view in
|
||||||
|
return TileContainer().with { instance in
|
||||||
|
instance.aspectRatio = .none
|
||||||
|
instance.addContentView(view)
|
||||||
|
instance.color = .custom(.lightGray)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func setupPicker() {
|
func setupPicker() {
|
||||||
surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
self?.component.surface = item
|
self?.component.surface = item
|
||||||
@ -184,6 +189,7 @@ class CarouselViewController: BaseViewController<Carousel> {
|
|||||||
|
|
||||||
gutterPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
gutterPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
self?.component.gutter = item
|
self?.component.gutter = item
|
||||||
|
self?.updateCarousel()
|
||||||
}
|
}
|
||||||
|
|
||||||
layoutPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
layoutPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
@ -194,6 +200,7 @@ class CarouselViewController: BaseViewController<Carousel> {
|
|||||||
}
|
}
|
||||||
self?.component.layout = item
|
self?.component.layout = item
|
||||||
self?.label.text = "0"
|
self?.label.text = "0"
|
||||||
|
self?.updateCarousel()
|
||||||
}
|
}
|
||||||
|
|
||||||
paginationKindPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
paginationKindPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
|
|||||||
@ -202,11 +202,12 @@ class TableViewController: BaseViewController<Table> {
|
|||||||
trailingToolTip.labelText = "5G Ultra Wideband is available in your area"
|
trailingToolTip.labelText = "5G Ultra Wideband is available in your area"
|
||||||
trailingToolTip.tooltipModel = .init(title: "Check the formatting of your address",
|
trailingToolTip.tooltipModel = .init(title: "Check the formatting of your address",
|
||||||
content:"House/Building number then street name")
|
content:"House/Building number then street name")
|
||||||
let image = UIImage(named: "clean-surface")
|
|
||||||
let imageView = UIImageView(image: image)
|
let iconView = Icon()
|
||||||
|
iconView.name = .cleanSurface
|
||||||
|
|
||||||
rows.append(TableRowModel(columns: [TableItemModel(bottomLine: .secondary, component:textArea),
|
rows.append(TableRowModel(columns: [TableItemModel(bottomLine: .secondary, component:textArea),
|
||||||
TableItemModel(bottomLine: .secondary, component:imageView),
|
TableItemModel(bottomLine: .secondary, component:iconView),
|
||||||
TableItemModel(bottomLine: .secondary, component:trailingToolTip)]))
|
TableItemModel(bottomLine: .secondary, component:trailingToolTip)]))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user