-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[#29] [iOS] [UI] As a user, I can see Survey Detail selection picker
- Loading branch information
Showing
7 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../Survey/Sources/Presentation/Modules/SurveyDetail/SurveyQuestion/QuestionPickerView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// QuestionPickerView.swift | ||
// Survey | ||
// | ||
// Created by Bliss on 11/1/23. | ||
// Copyright © 2023 Nimble. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct QuestionPickerView: View { | ||
|
||
@State private var selectedInput = "" | ||
|
||
let ids: [String] | ||
|
||
var body: some View { | ||
Picker(String(describing: Self.self), selection: $selectedInput) { | ||
ForEach(ids, id: \.self) { id in | ||
let font = selectedInput == id ? Font.boldLarge : Font.regularLarge | ||
Text(id) | ||
.font(font) | ||
.foregroundColor(Color.white) | ||
if id != ids.last { | ||
Divider() | ||
.overlay(Color.white) | ||
.frame(width: 215.0, height: 1.0) | ||
} | ||
} | ||
} | ||
.pickerStyle(.wheel) | ||
.padding(20.0) | ||
.onChange(of: selectedInput) { | ||
print($0) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters