You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into a display issue in "ORKFormStepViewController" where form elements of multiple types are not rendering correctly. Specifically, form elements for text fields (both single-line and multi-line), dates, and times are not visually separated into their intended sections. Rather, they appear obfuscated or grouped with the previous question.
Expected Behavior
Each form item type should be displayed in its own distinct section within the form step interface. The visual layout should clearly separate text fields, date pickers, and time pickers into groups that reflect the structure of the form.
Current Behavior
Form items are not being displayed in separate sections. For example, text fields (single and multiple lines) are shown without the necessary spacing or separators, leading to a cluttered interface where distinct elements are difficult to identify. Date and time pickers similarly do not have their dedicated sections, which causes confusion for the end-user. Sometimes, the question appear grouped with the previous question.
Steps to Reproduce
Create a ORKFormStep with a variety of form items, including single-line text, multi-line text, date, and time.
Present the form using ORKFormStepViewController.
Observe that the different form item types are not sectioned off properly.
Code sample
let formStep = ORKFormStep(identifier: "formStep", title: "Survey", text: "Please answer the following questions.")
let answerTextFormat = ORKAnswerFormat.textAnswerFormat()
answerTextFormat.placeholder = "My name is: "
answerTextFormat.multipleLines = true
let textItem = ORKFormItem(identifier: "textItem", text: "¿What is your name?", answerFormat: answerTextFormat, optional: false)
let singleChoiceItem = ORKFormItem(identifier: "singleChoiceItem", text: "Choose an option: ", answerFormat: ORKAnswerFormat.choiceAnswerFormat(with: .singleChoice, textChoices: [
ORKTextChoice(text: "Option 1", value: 0 as NSNumber),
ORKTextChoice(text: "Option 2", value: 1 as NSNumber),
ORKTextChoice(text: "Option 3", value: 2 as NSNumber),
ORKTextChoiceOther.choice(withText: "Other", detailText: "", value: 3 as NSNumber, exclusive: true, textViewPlaceholderText: "Tap to write your answer")
]))
let multipleChoiceItem = ORKFormItem(identifier: "multipleChoiceItem", text: "Select all the options you consider necessary: ", answerFormat: ORKAnswerFormat.choiceAnswerFormat(with: .multipleChoice, textChoices: [
ORKTextChoice(text: "Option 1", value: 0 as NSNumber),
ORKTextChoice(text: "Option 2", value: 1 as NSNumber),
ORKTextChoice(text: "Option 3", value: 2 as NSNumber),
ORKTextChoiceOther.choice(withText: "Other", detailText: "", value: 3 as NSNumber, exclusive: false, textViewPlaceholderText: "Tap to write your answer")
]))
let scaleItem = ORKFormItem(identifier: "scaleItem", text: "Select value:", answerFormat: ORKAnswerFormat.scale(
withMaximumValue: 10,
minimumValue: 1,
defaultValue: 5,
step: 1,
vertical: false,
maximumValueDescription: "Max",
minimumValueDescription: "Min")
)
let dateAnswerFormat = ORKDateAnswerFormat(style: .date)
let dateItem = ORKFormItem(identifier: "dateItem", text: "What is your birth date?", answerFormat: dateAnswerFormat, optional: false)
let timeOfDayAnswerFormat = ORKTimeOfDayAnswerFormat()
let timeItem = ORKFormItem(identifier: "timeItem", text: "What time do you usually wake up?", answerFormat: timeOfDayAnswerFormat, optional: false)
formStep.formItems = [singleChoiceItem, textItem, scaleItem, multipleChoiceItem, dateItem, timeItem]
Screenshots
The text was updated successfully, but these errors were encountered:
I'm running into a display issue in "ORKFormStepViewController" where form elements of multiple types are not rendering correctly. Specifically, form elements for text fields (both single-line and multi-line), dates, and times are not visually separated into their intended sections. Rather, they appear obfuscated or grouped with the previous question.
Expected Behavior
Each form item type should be displayed in its own distinct section within the form step interface. The visual layout should clearly separate text fields, date pickers, and time pickers into groups that reflect the structure of the form.
Current Behavior
Form items are not being displayed in separate sections. For example, text fields (single and multiple lines) are shown without the necessary spacing or separators, leading to a cluttered interface where distinct elements are difficult to identify. Date and time pickers similarly do not have their dedicated sections, which causes confusion for the end-user. Sometimes, the question appear grouped with the previous question.
Steps to Reproduce
ORKFormStep
with a variety of form items, including single-line text, multi-line text, date, and time.ORKFormStepViewController
.Code sample
Screenshots
The text was updated successfully, but these errors were encountered: