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 am trying to add some conditional logic in my data feed, here is how the sample data file looks:
ExampleData.swift:
public struct Item {
var name: String
var active: Bool
var icon: String?
var position: String?
public init(name: String, active: Bool, icon: String?, position: String?) {
self.name = name
self.active = active
self.icon = icon
self.position = position
}
}
public struct Section {
var name: String
var items: [Item]
var collapsed: Bool
public init(name: String, items: [Item], collapsed: Bool = false) {
self.name = name
self.items = items
self.collapsed = collapsed
}
}
public var sectionsData: [Section] = [
Section(name: "Profile", items: [
Item(name: "UsersFirstName", active: false, icon: "none", position: "left"),
Item(name: "EmailAddress", active: false, icon: "none", position: "left"),
Item(name: "Change your email", active: true, icon: "chevron", position: "left"),
Item(name: "Change your password", active: true, icon: "chevron", position: "left")
]),
Section(name: "Support", items: [
Item(name: "Call us", active: true, icon: "call", position: "left"),
Item(name: "Provide feedback", active: true, icon: "feedback", position: "left"),
Item(name: "Help", active: true, icon: "help", position: "left")
]),
Section(name: "Learn More Info", items: [
Item(name: "Terms and Conditions", active: true, icon: "chevron", position: "left"),
Item(name: "Version #.##.#", active: false, icon: "none", position: "center")
])
]
Then in the table, I'm trying to set the cells to have conditional formatting as depicted below (whether its active OR if the the text should be centered):
However, when I run everything, it looks correct however, once I start expanding and collapsing the last section, the first item "Terms and Conditions" is not enabled.
Is there something I am missing, such as a "refresh" or am I not properly loading the data? Any assistance or suggestions would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
I am trying to add some conditional logic in my data feed, here is how the sample data file looks:
ExampleData.swift:
Then in the table, I'm trying to set the cells to have conditional formatting as depicted below (whether its active OR if the the text should be centered):
CollapsibleTableViewController.swift:
However, when I run everything, it looks correct however, once I start expanding and collapsing the last section, the first item "Terms and Conditions" is not enabled.
Is there something I am missing, such as a "refresh" or am I not properly loading the data? Any assistance or suggestions would be greatly appreciated!
The text was updated successfully, but these errors were encountered: