paint-brush
Why I Cannot Add Variable to GeometryReader{} Closure Argumentby@siyang-ren
127 reads

Why I Cannot Add Variable to GeometryReader{} Closure Argument

by [email protected]4mJuly 11th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A programmer has been using Javascrift for the past two years. He wants to use a GeometryReader{} to contain a view, so he can decide the position of the view base on the parent container property such as size, coordinates space, ect... But he gets an error like this: "Why I can not write variable inside a closure?" He then encountered another issue, Generic parameter`Content`could not be infered. So, I explicitly specify the arguments to fix this issue.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Why I Cannot Add Variable to GeometryReader{} Closure Argument
seanren96@gmail.com HackerNoon profile picture
seanren96@gmail.com

[email protected]

@siyang-ren

I am a programmer focusing on Swift recently and have been using Javascrift for the past two years.

About @siyang-ren
LEARN MORE ABOUT @SIYANG-REN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

seanren96@gmail.com HackerNoon profile picture
[email protected]@siyang-ren
I am a programmer focusing on Swift recently and have been using Javascrift for the past two years.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite