美文网首页
UI基本控件对照 - from UIKit to SwiftUI

UI基本控件对照 - from UIKit to SwiftUI

作者: 老鹰_ | 来源:发表于2020-11-06 09:15 被阅读0次
    UIKit SwiftUI 备注
    UITableView List 效果类似于UITableView的planeStyle
    UITableView Form 效果类似于UITableView的groupStyle
    UITableView 的header,footer Section 配合SwiftUI的Form,List使用
    UICollectionView No SwiftUI equivalent "
    UILabel Text "
    UITextField TextField "
    UITextField with isSecureTextEntry set to true SecureField "
    UITextView No SwiftUI equivalent "
    UISwitch 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 废弃, use DatePicker instead
    UIStepper Stepper "
    UIDatePicker DatePicker "
    NSAttributedString Incompatible with SwiftUI use Text instead

    相关文章

      网友评论

          本文标题:UI基本控件对照 - from UIKit to SwiftUI

          本文链接:https://www.haomeiwen.com/subject/isyovktx.html