Member-only story

Text And Button with SwuiftUI

Nicola De Filippo
4 min readNov 29, 2024

Upon creating a new project, we see a dialog to select the project name:

After creating the project, we see the file list on the left sidebar, the code and preview in the center, and the properties of the selected object on the right.

In SwiftUI, the main term we encounter frequently is “View.” This is a protocol, and to display an object, we need to use this protocol. By default, it provides methods to manage the properties of objects. Another interesting keyword is “some,” which refers to an “opaque type.”

I found a helpful post explaining this concept: https://medium.com/@PhiJay/whats-this-some-in-swiftui-34e2c126d4c4 . I recommend giving it a read. If you’d prefer a summary, the key point is:

“Adding this keyword turns the return type into an opaque type, meaning 
that both you and the compiler know this function will always return
only one specific concrete type — but you’ll never know exactly which one!”

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Nicola De Filippo
Nicola De Filippo

Written by Nicola De Filippo

Software Engineer and Entrepreneur

No responses yet

Write a response