└── README.md
/README.md:
--------------------------------------------------------------------------------
1 | # UIKit-Documentation-TheAppWizard
2 |
3 | ## UIKit-Alert
4 | ```
5 | @IBAction func showAlert(){
6 |
7 | let alert = UIAlertController(
8 | title: "Hello Alert",
9 | message: "Alert Message",
10 | preferredStyle: .alert
11 | )
12 |
13 | let action = UIAlertAction(
14 | title: "Awesome Alert", style: .default, handler: nil
15 |
16 | )
17 |
18 | alert.addAction(action)
19 | present(alert,animated: true,completion: nil)
20 |
21 | }
22 | ```
23 |
24 |
25 |
26 | ## UIKit-Slider
27 | ```
28 | @IBAction func sliderMoved(_ slider : UISlider){
29 | print("The Value of Slider is : \(slider.value)")
30 | }
31 | ```
32 |
33 |
34 | ## UIKit-Slider with Alert
35 | ```
36 | //Slider Current Value Integer
37 | var currentValue: Int = 0
38 |
39 | @IBAction func showAlert(){
40 | let message = "The value of the Slider is : \(currentValue)"
41 |
42 |
43 | let alert = UIAlertController(
44 | title: "Slider Value",
45 | message: message,
46 | preferredStyle: .alert
47 |
48 | )
49 |
50 | let action = UIAlertAction(
51 | title: "OK",
52 | style: .default,
53 | handler: nil
54 | )
55 |
56 | alert.addAction(action)
57 | present(alert, animated: true, completion: nil)
58 |
59 | }
60 |
61 |
62 | @IBAction func sliderMoved(_ slider : UISlider){
63 | currentValue = lroundf(slider.value)
64 | }
65 |
66 |
67 | ```
68 |
69 |
70 | ## UIKit-Label
71 | ```
72 | @IBOutlet weak var showLabel: UILabel!
73 |
74 | override func viewDidLoad() {
75 | super.viewDidLoad()
76 | // Do any additional setup after loading the view.
77 |
78 | showLabel.text = "Hello World"
79 | }
80 | ```
81 |
82 |
83 | ## UIKit-Slider with Label
84 | ```
85 | @IBAction func sliderMoved(_ slider : UISlider){
86 | currentValue = lroundf(slider.value)
87 | showLabel.text = "\(slider.value)"
88 |
89 | }
90 |
91 | ```
92 |
93 |
94 |
--------------------------------------------------------------------------------