UIKit to SwiftUI
If you’ve used UIKit before, some of the classes you recognize and love map quite much immediately to their SwiftUI equivalents just by dropping the UI prefix. That doesn’t mean they may be the identical element underneath, simply that they’ve the equal or comparable functionality.
UITableView => List
UICollectionView => Not SwiftUI equivalent
UILabel => Text
UITextView => Not SwiftUI equivalent
UISwitch: =>Toggle
UISlider =>Slider
UIButton =>Button
UINavigationController =>NavigationView
UIImageView => Image
UISegmentedControl =>SegmentedControl
UIStepper => Stepper
UIDatePicker =>DatePicker
Get Akash Nara’s stories in your inbox
Join Medium for free to get updates from this writer.
UIAlertController :-
style .Alert: =>Alert
style .ActionSheet =>ActionSheet
UITextField:-
UITextField => TextField
flag isSecureTextEntry set to true: => SecureField
UIStackView :-
Horizontal axis =>HStack
vertical axis => VStack
NSAttributedString =>Incompatible with SwiftUI => will have to use Text instead.







