-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WCM] Landscape improvements #969
Conversation
7d01ca3
to
06d4628
Compare
} | ||
.transform { | ||
#if os(iOS) | ||
$0.autocapitalization(.none) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why autocapitalization is inside transform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, autocapitalization
is not available on macOS, so I had to wrap it in this #if os()
and this transform
helper method allows to do that inline rather than having the entire view duplicated with if/else
.
However I've change the condition to really reflect the problem, and add #if not macOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The transform method is really this simple
func transform(@ViewBuilder _ transform: (Self) -> some View) -> some View {
transform(self)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
0647a44
to
e1a6964
Compare
No description provided.