SwiftUI: the Label view

The Label view is used in views like TabView to show an icon and some text.

You create it by passing the text label as the first argument, and then another string to the systemImage parameter, which identifies the icon.

Like this:
Label(&#34…


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com

The Label view is used in views like TabView to show an icon and some text.

You create it by passing the text label as the first argument, and then another string to the systemImage parameter, which identifies the icon.

Like this:

Label("Calendar", systemImage: "calendar")

This will be the result:

The argument passed to the systemImage parameter is one of the SF Symbols icons.


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com


Print Share Comment Cite Upload Translate Updates
APA

flaviocopes.com | Sciencx (2021-10-05T05:00:00+00:00) SwiftUI: the Label view. Retrieved from https://www.scien.cx/2021/10/05/swiftui-the-label-view/

MLA
" » SwiftUI: the Label view." flaviocopes.com | Sciencx - Tuesday October 5, 2021, https://www.scien.cx/2021/10/05/swiftui-the-label-view/
HARVARD
flaviocopes.com | Sciencx Tuesday October 5, 2021 » SwiftUI: the Label view., viewed ,<https://www.scien.cx/2021/10/05/swiftui-the-label-view/>
VANCOUVER
flaviocopes.com | Sciencx - » SwiftUI: the Label view. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/05/swiftui-the-label-view/
CHICAGO
" » SwiftUI: the Label view." flaviocopes.com | Sciencx - Accessed . https://www.scien.cx/2021/10/05/swiftui-the-label-view/
IEEE
" » SwiftUI: the Label view." flaviocopes.com | Sciencx [Online]. Available: https://www.scien.cx/2021/10/05/swiftui-the-label-view/. [Accessed: ]
rf:citation
» SwiftUI: the Label view | flaviocopes.com | Sciencx | https://www.scien.cx/2021/10/05/swiftui-the-label-view/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.