Migrating from UIKit to SwiftUI
Here’s a list to get you started, with UIKit class names followed by SwiftUI names:
UITableView
:List
UICollectionView
: No SwiftUI equivalentUILabel
:Text
UITextField
:TextField
UITextField
withisSecureTextEntry
set to true:SecureField
UITextView
: No SwiftUI equivalentUISwitch
:Toggle
UISlider
:Slider
UIButton
:Button
UINavigationController
:NavigationView
UIAlertController
with style.alert
:Alert
UIAlertController
with style.actionSheet
:ActionSheet
UIStackView
with horizontal axis:HStack
UIStackView
with vertical axis:VStack
UIImageView
:Image
UISegmentedControl
:SegmentedControl
UIStepper
:Stepper
UIDatePicker
:DatePicker
NSAttributedString
: Incompatible with SwiftUI; useText
instead.There are many other components that are exclusive to SwiftUI, such as a stack view that lets us build things by depth rather than horizontally or vertically.
Swift Publisher Crack MacI am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
ReplyDelete
ReplyDeleteI am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
Swift Publisher Crack Mac