![]() You can see the below swift source code to know how to create the second UISwitch UI component programmatically. Then write the below source code in the ViewController.swift class file to create the second UISwitch object programmatically.Connect the label and UISwitch UI component to the ViewController class’s instance variables, and add a function to process the UISwitch value changed event ( How To Connect Storyboard UI Component To ViewController Class Code ).And add constraints to them to make them auto-layout responsively ( How To Add Constraints In Xcode 10 To Implement Auto Layout, iOS Auto Layout With Constraint Example ). ![]() Click to edit the Main.storyboard file, add one label and one UISwitch UI component in it ( How To Display Xcode Library, Assistant Editor, Inspectors Window ).Create an Xcode project using the Single View App template.If you can not see the above video, you can see it in the youtube URL 1.
0 Comments
Leave a Reply. |