Digital ACT-191 ONEAPP-10586 story: added new page for footnote group
This commit is contained in:
parent
fe4df9d1a0
commit
062212e647
@ -35,6 +35,7 @@
|
|||||||
180636CB2C29B12B00C92D86 /* InputStepperViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180636CA2C29B12B00C92D86 /* InputStepperViewController.swift */; };
|
180636CB2C29B12B00C92D86 /* InputStepperViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 180636CA2C29B12B00C92D86 /* InputStepperViewController.swift */; };
|
||||||
1808BEBE2BA4479500129230 /* CarouselScrollbarViewConttroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1808BEBD2BA4479500129230 /* CarouselScrollbarViewConttroller.swift */; };
|
1808BEBE2BA4479500129230 /* CarouselScrollbarViewConttroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1808BEBD2BA4479500129230 /* CarouselScrollbarViewConttroller.swift */; };
|
||||||
1832AC5B2BA1347B008AE476 /* BreadcrumbsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */; };
|
1832AC5B2BA1347B008AE476 /* BreadcrumbsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */; };
|
||||||
|
183B16F52C80B27C00BA6A10 /* FootnoteGroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 183B16F42C80B27C00BA6A10 /* FootnoteGroupViewController.swift */; };
|
||||||
184023492C61E9E700A412C8 /* PriceLockupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184023482C61E9E700A412C8 /* PriceLockupViewController.swift */; };
|
184023492C61E9E700A412C8 /* PriceLockupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184023482C61E9E700A412C8 /* PriceLockupViewController.swift */; };
|
||||||
186D13CD2BBA990800986B53 /* DropdownSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186D13CC2BBA990800986B53 /* DropdownSelectViewController.swift */; };
|
186D13CD2BBA990800986B53 /* DropdownSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186D13CC2BBA990800986B53 /* DropdownSelectViewController.swift */; };
|
||||||
18926F5F2C76185A00C55BF6 /* FootnoteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18926F5E2C76185A00C55BF6 /* FootnoteViewController.swift */; };
|
18926F5F2C76185A00C55BF6 /* FootnoteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18926F5E2C76185A00C55BF6 /* FootnoteViewController.swift */; };
|
||||||
@ -136,6 +137,7 @@
|
|||||||
180636CA2C29B12B00C92D86 /* InputStepperViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputStepperViewController.swift; sourceTree = "<group>"; };
|
180636CA2C29B12B00C92D86 /* InputStepperViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputStepperViewController.swift; sourceTree = "<group>"; };
|
||||||
1808BEBD2BA4479500129230 /* CarouselScrollbarViewConttroller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselScrollbarViewConttroller.swift; sourceTree = "<group>"; };
|
1808BEBD2BA4479500129230 /* CarouselScrollbarViewConttroller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselScrollbarViewConttroller.swift; sourceTree = "<group>"; };
|
||||||
1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbsViewController.swift; sourceTree = "<group>"; };
|
1832AC5A2BA1347B008AE476 /* BreadcrumbsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbsViewController.swift; sourceTree = "<group>"; };
|
||||||
|
183B16F42C80B27C00BA6A10 /* FootnoteGroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FootnoteGroupViewController.swift; sourceTree = "<group>"; };
|
||||||
184023482C61E9E700A412C8 /* PriceLockupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PriceLockupViewController.swift; sourceTree = "<group>"; };
|
184023482C61E9E700A412C8 /* PriceLockupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PriceLockupViewController.swift; sourceTree = "<group>"; };
|
||||||
186D13CC2BBA990800986B53 /* DropdownSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropdownSelectViewController.swift; sourceTree = "<group>"; };
|
186D13CC2BBA990800986B53 /* DropdownSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropdownSelectViewController.swift; sourceTree = "<group>"; };
|
||||||
18926F5E2C76185A00C55BF6 /* FootnoteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FootnoteViewController.swift; sourceTree = "<group>"; };
|
18926F5E2C76185A00C55BF6 /* FootnoteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FootnoteViewController.swift; sourceTree = "<group>"; };
|
||||||
@ -344,6 +346,7 @@
|
|||||||
EA1758452BC8893700A5C0D9 /* DatePickerViewController.swift */,
|
EA1758452BC8893700A5C0D9 /* DatePickerViewController.swift */,
|
||||||
186D13CC2BBA990800986B53 /* DropdownSelectViewController.swift */,
|
186D13CC2BBA990800986B53 /* DropdownSelectViewController.swift */,
|
||||||
18926F5E2C76185A00C55BF6 /* FootnoteViewController.swift */,
|
18926F5E2C76185A00C55BF6 /* FootnoteViewController.swift */,
|
||||||
|
183B16F42C80B27C00BA6A10 /* FootnoteGroupViewController.swift */,
|
||||||
EA985C00296CC21C00F2FF2E /* IconViewController.swift */,
|
EA985C00296CC21C00F2FF2E /* IconViewController.swift */,
|
||||||
180636CA2C29B12B00C92D86 /* InputStepperViewController.swift */,
|
180636CA2C29B12B00C92D86 /* InputStepperViewController.swift */,
|
||||||
EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */,
|
EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */,
|
||||||
@ -562,6 +565,7 @@
|
|||||||
18AE87522C06FDD60075F181 /* CarouselViewController.swift in Sources */,
|
18AE87522C06FDD60075F181 /* CarouselViewController.swift in Sources */,
|
||||||
EA596ABA2A16B2ED00300C4B /* TabsViewController.swift in Sources */,
|
EA596ABA2A16B2ED00300C4B /* TabsViewController.swift in Sources */,
|
||||||
EA89204E28B67332006B9984 /* CheckBoxGroupViewController.swift in Sources */,
|
EA89204E28B67332006B9984 /* CheckBoxGroupViewController.swift in Sources */,
|
||||||
|
183B16F52C80B27C00BA6A10 /* FootnoteGroupViewController.swift in Sources */,
|
||||||
EAA5EEAD28EB6924003B3210 /* InputFieldViewController.swift in Sources */,
|
EAA5EEAD28EB6924003B3210 /* InputFieldViewController.swift in Sources */,
|
||||||
440B84CC2BD8E98B004A732A /* TableViewController.swift in Sources */,
|
440B84CC2BD8E98B004A732A /* TableViewController.swift in Sources */,
|
||||||
EA985C25296E06EA00F2FF2E /* TextAreaViewController.swift in Sources */,
|
EA985C25296E06EA00F2FF2E /* TextAreaViewController.swift in Sources */,
|
||||||
|
|||||||
69
VDSSample/ViewControllers/FootnoteGroupViewController.swift
Normal file
69
VDSSample/ViewControllers/FootnoteGroupViewController.swift
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//
|
||||||
|
// FootnoteGroupViewController.swift
|
||||||
|
// VDSSample
|
||||||
|
//
|
||||||
|
// Created by Kanamarlapudi, Vasavi on 29/08/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import UIKit
|
||||||
|
import VDS
|
||||||
|
|
||||||
|
class FootnoteGroupViewController: BaseViewController<FootnoteGroup> {
|
||||||
|
|
||||||
|
var widthTextField = NumericField()
|
||||||
|
var percentageTextField = NumericField()
|
||||||
|
var footnotes: [Footnote] = []
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
addContentTopView(view: component)
|
||||||
|
setupPicker()
|
||||||
|
setupModel()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func setupForm() {
|
||||||
|
super.setupForm()
|
||||||
|
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||||
|
addFormRow(label: "Width", view: widthTextField)
|
||||||
|
addFormRow(label: "Percentage (1-100)", view: percentageTextField)
|
||||||
|
|
||||||
|
widthTextField
|
||||||
|
.numberPublisher
|
||||||
|
.sink { [weak self] number in
|
||||||
|
if let number {
|
||||||
|
self?.component.width = .value(number.cgFloatValue)
|
||||||
|
self?.percentageTextField.text = ""
|
||||||
|
} else {
|
||||||
|
self?.component.width = nil
|
||||||
|
}
|
||||||
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
|
percentageTextField
|
||||||
|
.numberPublisher
|
||||||
|
.sink { [weak self] number in
|
||||||
|
if let number, number.intValue > 9 {
|
||||||
|
self?.component.width = .percentage(number.cgFloatValue)
|
||||||
|
self?.widthTextField.text = ""
|
||||||
|
} else {
|
||||||
|
self?.component.width = nil
|
||||||
|
}
|
||||||
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func setupModel() {
|
||||||
|
let toolTipModel = Tooltip.TooltipModel.init(title: "Check your item.", content:"Here is the content for your item.")
|
||||||
|
footnotes.append(Footnote().with { $0.text = "Offer you best deals on phones, tablets, home, internet and more. Pre order the new version mobiles and get off *T&C apply."; $0.symbolType = .asterisk; $0.kind = .primary; $0.tooltipModel = toolTipModel})
|
||||||
|
footnotes.append(Footnote().with { $0.text = "The display has rounded corners. When measured as a standard rectangular shape, the screen is 6.68 inches diagonally. Actual viewable area is less."; $0.symbolType = .doubleAsterisk; $0.kind = .primary})
|
||||||
|
footnotes.append(Footnote().with { $0.text = " Some features may not be available for all countries or all areas."; $0.symbolType = .character; $0.kind = .primary})
|
||||||
|
component.footnoteitems = footnotes
|
||||||
|
}
|
||||||
|
|
||||||
|
func setupPicker() {
|
||||||
|
surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
|
self?.component.surface = item
|
||||||
|
self?.contentTopView.backgroundColor = item.color
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -68,7 +68,7 @@ class FootnoteViewController: BaseViewController<Footnote> {
|
|||||||
percentageTextField
|
percentageTextField
|
||||||
.numberPublisher
|
.numberPublisher
|
||||||
.sink { [weak self] number in
|
.sink { [weak self] number in
|
||||||
if let number {
|
if let number, number.intValue > 9 {
|
||||||
self?.component.width = .percentage(number.cgFloatValue)
|
self?.component.width = .percentage(number.cgFloatValue)
|
||||||
self?.widthTextField.text = ""
|
self?.widthTextField.text = ""
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -83,6 +83,7 @@ class MenuViewController: UITableViewController, TooltipLaunchable {
|
|||||||
MenuComponent(title: "DatePicker", completed: true, viewController: DatePickerViewController.self),
|
MenuComponent(title: "DatePicker", completed: true, viewController: DatePickerViewController.self),
|
||||||
MenuComponent(title: "DropdownSelect", completed: true, viewController: DropdownSelectViewController.self),
|
MenuComponent(title: "DropdownSelect", completed: true, viewController: DropdownSelectViewController.self),
|
||||||
MenuComponent(title: "Footnote", completed: false, viewController: FootnoteViewController.self),
|
MenuComponent(title: "Footnote", completed: false, viewController: FootnoteViewController.self),
|
||||||
|
MenuComponent(title: "FootnoteGroup", completed: false, viewController: FootnoteGroupViewController.self),
|
||||||
MenuComponent(title: "Icon", completed: true, viewController: IconViewController.self),
|
MenuComponent(title: "Icon", completed: true, viewController: IconViewController.self),
|
||||||
MenuComponent(title: "InputField", completed: true, viewController: InputFieldViewController.self),
|
MenuComponent(title: "InputField", completed: true, viewController: InputFieldViewController.self),
|
||||||
MenuComponent(title: "InputStepper", completed: true, viewController: InputStepperViewController.self),
|
MenuComponent(title: "InputStepper", completed: true, viewController: InputStepperViewController.self),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user