Merge branch 'update/SelectorView' into 'develop'
refactored to use models See merge request BPHV_MIPS/vds_ios_sample!34
This commit is contained in:
commit
67e6080dac
176
VDS.xcworkspace/contents.xcworkspacedata
generated
176
VDS.xcworkspace/contents.xcworkspacedata
generated
@ -4,182 +4,6 @@
|
||||
<FileRef
|
||||
location = "container:VDSSample.xcodeproj">
|
||||
</FileRef>
|
||||
<Group
|
||||
location = "group:VDSSample"
|
||||
name = "VDSSample">
|
||||
<Group
|
||||
location = "group:VDSSample/Supporting Files"
|
||||
name = "Supporting Files">
|
||||
<Group
|
||||
location = "group:VDSSample/Supporting Files/Artifactory"
|
||||
name = "Artifactory">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Supporting Files/Artifactory/ArtifactoryItems.txt">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/Supporting Files/Artifactory/DownloadArtifactoryItems.sh">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/Supporting Files/Artifactory/Artifactory.sh">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "group:VDSSample/Supporting Files/Resources"
|
||||
name = "Resources">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Supporting Files/Resources/Assets.xcassets">
|
||||
</FileRef>
|
||||
<Group
|
||||
location = "group:VDSSample/Supporting Files/Resources"
|
||||
name = "LaunchScreen.storyboard">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Supporting Files/Resources/Base.lproj/LaunchScreen.storyboard">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "group:VDSSample/Supporting Files/Resources"
|
||||
name = "Main.storyboard">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Supporting Files/Resources/Base.lproj/Main.storyboard">
|
||||
</FileRef>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group
|
||||
location = "group:VDSSample/Extensions"
|
||||
name = "Extensions">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Extensions/IconName.swift">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "group:VDSSample/Protocols"
|
||||
name = "Protocols">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Protocols/PickerBase.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/Protocols/StoryboardInitable.swift">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "group:VDSSample/Classes"
|
||||
name = "Classes">
|
||||
<FileRef
|
||||
location = "group:VDSSample/Classes/TextField.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/Classes/Helper.swift">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "group:VDSSample/ViewControllers"
|
||||
name = "ViewControllers">
|
||||
<Group
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController"
|
||||
name = "ScrollViewController">
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/ScrollViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/KeyboardFrameChangeListener.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/ScrollViewKeyboardAvoiding.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/KeyboardFrameChangeListening.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/KeyboardFrameChange.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/ScrollViewKeyboardAvoider.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ScrollViewController/ScrollWrapperView.swift">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/MenuViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/BaseViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/BadgeViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ButtonGroupViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ButtonViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/CheckBoxGroupViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/CheckboxViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/IconViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/InputFieldViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TextLinkViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/LabelViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/LineViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/NotificationViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/RadioBoxGroupViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/RadioButtonViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/RadioSwatchGroupViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TextAreaViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TextLinkCaretViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TileContainerViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TileletViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TitleLockupViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/ToggleViewController.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/ViewControllers/TooltipViewController.swift">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<FileRef
|
||||
location = "group:VDSSample/AppDelegate.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/SceneDelegate.swift">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:VDSSample/Info.plist">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<FileRef
|
||||
location = "group:vds_ios/VDS.xcodeproj">
|
||||
</FileRef>
|
||||
|
||||
@ -60,19 +60,19 @@ class CheckboxGroupViewController: BaseViewController {
|
||||
}
|
||||
|
||||
func setupModel() {
|
||||
let checkbox1 = Checkbox()
|
||||
var checkbox1 = CheckboxGroup.CheckboxModel()
|
||||
checkbox1.inputId = "model1"
|
||||
checkbox1.value = "model 1 Value"
|
||||
checkbox1.labelText = "iPhone 11 Bundle 1"
|
||||
checkbox1.childText = "Apple iPhone 11 - 64 GB\nOtterbox Case Red\nScreen Protector"
|
||||
|
||||
let checkbox2 = Checkbox()
|
||||
var checkbox2 = CheckboxGroup.CheckboxModel()
|
||||
checkbox2.inputId = "model2"
|
||||
checkbox2.value = "model 2 Value"
|
||||
checkbox2.labelText = "iPhone 11 Bundle 2"
|
||||
checkbox2.childText = "Apple iPhone 11 - 128 GB\nOtterbox Case Black\nScreen Protector"
|
||||
|
||||
checkboxGroup.selectorViews = [checkbox1, checkbox2]
|
||||
checkboxGroup.selectorModels = [checkbox1, checkbox2]
|
||||
|
||||
checkboxGroup.onChange = { [weak self] group in
|
||||
let selected = group.selectedHandlers?
|
||||
|
||||
@ -70,21 +70,21 @@ class RadioBoxGroupViewController: BaseViewController {
|
||||
|
||||
func setupModel(){
|
||||
|
||||
let radioBox1 = RadioBox()
|
||||
var radioBox1 = RadioBoxGroup.RadioBoxModel()
|
||||
radioBox1.inputId = "model1"
|
||||
radioBox1.isSelected = true
|
||||
radioBox1.selected = true
|
||||
radioBox1.value = "model 1 Value"
|
||||
radioBox1.text = "iPhone 11 Bundle 1"
|
||||
radioBox1.subText = "Apple iPhone 11 - 64 GB\nOtterbox Case Red\nScreen Protector"
|
||||
radioBox1.subTextRight = "Right Text"
|
||||
|
||||
let radioBox2 = RadioBox()
|
||||
var radioBox2 = RadioBoxGroup.RadioBoxModel()
|
||||
radioBox2.inputId = "model2"
|
||||
radioBox2.value = "model 2 Value"
|
||||
radioBox2.text = "iPhone 11 Bundle 2"
|
||||
radioBox2.subText = "Apple iPhone 11 - 128 GB\nOtterbox Case Black\nScreen Protector"
|
||||
|
||||
radioBoxGroup.selectorViews = [radioBox1, radioBox2]
|
||||
radioBoxGroup.selectorModels = [radioBox1, radioBox2]
|
||||
|
||||
radioBoxGroup
|
||||
.publisher(for: .valueChanged)
|
||||
|
||||
@ -61,25 +61,25 @@ class RadioButtonViewController: BaseViewController {
|
||||
}
|
||||
|
||||
func setupModel(){
|
||||
let radioButton1 = RadioButton()
|
||||
var radioButton1 = RadioButtonGroup.RadioButtonModel()
|
||||
radioButton1.inputId = "model1"
|
||||
radioButton1.value = "model 1 Value"
|
||||
radioButton1.labelText = "iPhone 11 Bundle 1"
|
||||
radioButton1.childText = "Apple iPhone 11 - 64 GB\nOtterbox Case Red\nScreen Protector"
|
||||
|
||||
let radioButton2 = RadioButton()
|
||||
var radioButton2 = RadioButtonGroup.RadioButtonModel()
|
||||
radioButton2.inputId = "model2"
|
||||
radioButton2.value = "model 2 Value"
|
||||
radioButton2.labelText = "iPhone 11 Bundle 2"
|
||||
radioButton2.childText = "Apple iPhone 11 - 128 GB\nOtterbox Case Black\nScreen Protector"
|
||||
|
||||
let radioButton3 = RadioButton()
|
||||
var radioButton3 = RadioButtonGroup.RadioButtonModel()
|
||||
radioButton3.inputId = "model3"
|
||||
radioButton3.value = "model 3 Value"
|
||||
radioButton3.labelText = "iPhone 11 Bundle 3"
|
||||
radioButton3.childText = "Apple iPhone 11 - 256 GB\nOtterbox Case Black\nScreen Protector"
|
||||
|
||||
radioButtonGroup.selectorViews = [radioButton1, radioButton2, radioButton3]
|
||||
radioButtonGroup.selectorModels = [radioButton1, radioButton2, radioButton3]
|
||||
|
||||
radioButtonGroup.onChange = { [weak self] group in
|
||||
let alertController:UIAlertController = UIAlertController(title: "Alert",
|
||||
|
||||
@ -42,48 +42,48 @@ class RadioSwatchGroupViewController: BaseViewController {
|
||||
|
||||
func setupModel(){
|
||||
|
||||
let radioSwatch1 = RadioSwatch()
|
||||
var radioSwatch1 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch1.fillImage = UIImage(named: "imageSwatch")
|
||||
radioSwatch1.text = "Image"
|
||||
radioSwatch1.inputId = "radioSwatch1"
|
||||
|
||||
let radioSwatch2 = RadioSwatch()
|
||||
var radioSwatch2 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch2.primaryColor = .red
|
||||
radioSwatch2.secondaryColor = .blue
|
||||
radioSwatch2.text = "Red/Blue"
|
||||
radioSwatch2.inputId = "radioSwatch2"
|
||||
|
||||
let radioSwatch3 = RadioSwatch()
|
||||
var radioSwatch3 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch3.primaryColor = .green
|
||||
radioSwatch3.text = "Green"
|
||||
radioSwatch3.inputId = "radioSwatch3"
|
||||
|
||||
let radioSwatch4 = RadioSwatch()
|
||||
var radioSwatch4 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch4.primaryColor = .orange
|
||||
radioSwatch4.text = "Orange"
|
||||
radioSwatch4.inputId = "radioSwatch4"
|
||||
|
||||
let radioSwatch5 = RadioSwatch()
|
||||
var radioSwatch5 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch5.primaryColor = .brown
|
||||
radioSwatch5.text = "Brown"
|
||||
radioSwatch5.inputId = "radioSwatch5"
|
||||
|
||||
let radioSwatch6 = RadioSwatch()
|
||||
var radioSwatch6 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch6.primaryColor = .yellow
|
||||
radioSwatch6.text = "Yellow"
|
||||
radioSwatch6.inputId = "radioSwatch6"
|
||||
|
||||
let radioSwatch7 = RadioSwatch()
|
||||
var radioSwatch7 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch7.primaryColor = .purple
|
||||
radioSwatch7.text = "Puple"
|
||||
radioSwatch7.inputId = "radioSwatch7"
|
||||
|
||||
let radioSwatch8 = RadioSwatch()
|
||||
var radioSwatch8 = RadioSwatchGroup.RadioSwatchModel()
|
||||
radioSwatch8.primaryColor = .systemPink
|
||||
radioSwatch8.text = "Pink"
|
||||
radioSwatch8.inputId = "radioSwatch8"
|
||||
|
||||
radioSwatchGroup.selectorViews = [radioSwatch1, radioSwatch2, radioSwatch3, radioSwatch4, radioSwatch5, radioSwatch6, radioSwatch7, radioSwatch8]
|
||||
radioSwatchGroup.selectorModels = [radioSwatch1, radioSwatch2, radioSwatch3, radioSwatch4, radioSwatch5, radioSwatch6, radioSwatch7, radioSwatch8]
|
||||
|
||||
radioSwatchGroup.onChange = { group in
|
||||
print("Selected: \(group.selectedHandler?.text ?? "none")")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user