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 access a nested struct value using dot notation.
Something like this
// Model
class NestedModel {
var name: String?;
}
class Model {
var nestedModel: NestedModel?;
}
// layout.xml
<UILabel
width="100%"
textColor="titleColor"
text="{nestedModel.name}"
/>
The error says it is an unknown property.
Unknown property name in nestedModel in nestedModel.name expression in text expression in UILabel in UIView
Is there any way to unwrap the optional value in the template
The text was updated successfully, but these errors were encountered:
This looks like an oversight in Layout’s type system. I don’t think there’s a workaround other than making the value non-optional - I’ll try to fix it for the next release.
I am trying to access a nested struct value using dot notation.
Something like this
The error says it is an unknown property.
Is there any way to unwrap the optional value in the template
The text was updated successfully, but these errors were encountered: