<repo_name>imNK2204/UIElements<file_sep>/UIElements/UIElements/screen1VC.swift
//
//  screen1VC.swift
//  UIElements
//
//  Created by srk on 20/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class screen1VC: UIViewController {
    
    private let Label1:UILabel = {
        let label = UILabel()
        label.text = "Sign Up Here!"
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 40)
        return label
    }()
    
    private let Label2:UILabel = {
        let label = UILabel()
        label.text = "Name"
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 20)
        return label
    }()
    
    private let NameTextView:UITextView = {
        let textView = UITextView()
        textView.text = "Enter Your Name"
        textView.font = UIFont.systemFont(ofSize: 20)
        textView.textAlignment = .center
        textView.backgroundColor = #colorLiteral(red: 0.9637209141, green: 0.9637209141, blue: 0.9637209141, alpha: 1)
        textView.layer.cornerRadius = 20
        return textView
    }()
    
    private let Label3:UILabel = {
        let label = UILabel()
        label.text = "Password"
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 20)
        return label
    }()
    
    private let PasswordTextField:UITextField = {
        let textField = UITextField()
        textField.placeholder = "Enter Your Password"
        textField.font = UIFont.systemFont(ofSize: 20)
        textField.textAlignment = .center
        textField.backgroundColor = #colorLiteral(red: 0.9637209141, green: 0.9637209141, blue: 0.9637209141, alpha: 1)
        textField.borderStyle = .roundedRect
//        textField.backgroundColor = #colorLiteral(red: 0.5, green: 0.5, blue: 0.5, alpha: 1)
        return textField
    }()
    
    private let Label4:UILabel = {
        let label = UILabel()
        label.text = "Date Of Birth"
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 20)
        return label
    }()
    
    private let DatePicker:UIDatePicker = {
        let datePicker = UIDatePicker()
        datePicker.datePickerMode = .date
        datePicker.backgroundColor = #colorLiteral(red: 0.9637209141, green: 0.9637209141, blue: 0.9637209141, alpha: 1)
        datePicker.timeZone = TimeZone(secondsFromGMT: 0)
//        datePicker.addTarget(self, action: #selector(takeDate), for: .valueChanged)
        return datePicker
    }()
    
    private let ProgressView:UIProgressView = {
        let progressView = UIProgressView()
        progressView.setProgress(0.0, animated: true)
        return progressView
    }()
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        UIView.animate(withDuration: 10.0) {
            self.ProgressView.setProgress(1.0, animated: true)
        }
    }
    
    private let Continue:UIButton = {
        let button = UIButton()
        button.setTitle("Continue...", for: .normal)
        button.addTarget(self, action: #selector(moveTo), for: .touchUpInside)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        return button
    }()
    
    @objc func moveTo() {
        let vc = screen2VC()
        navigationController?.pushViewController(vc, animated: true)
        navigationController?.navigationBar.backgroundColor = #colorLiteral(red: 0.143452806, green: 0.1553194879, blue: 0.1725588291, alpha: 1)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor.white
//        view.backgroundColor = #colorLiteral(red: 0.08141656091, green: 0.08141656091, blue: 0.08141656091, alpha: 1)
        title = "Sign Up"
        view.addSubview(Label1)
        view.addSubview(Label2)
        view.addSubview(NameTextView)
        view.addSubview(Label3)
        view.addSubview(PasswordTextField)
        view.addSubview(Label4)
        view.addSubview(DatePicker)
        view.addSubview(ProgressView)
        view.addSubview(Continue)
        // Do any additional setup after loading the view.
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        Label1.frame = CGRect(x: 30, y: 200, width: view.width - 40, height: 50)
        Label2.frame = CGRect(x: 20, y: Label1.bottom + 20, width: view.width - 40, height: 20)
        NameTextView.frame = CGRect(x: 20, y: Label2.bottom + 10, width: view.width - 40, height: 50)
        Label3.frame = CGRect(x: 20, y: NameTextView.bottom + 20, width: view.width - 40, height: 20)
        PasswordTextField.frame = CGRect(x: 20, y: Label3.bottom + 10, width: view.width - 40, height: 50)
        Label4.frame = CGRect(x: 20, y: PasswordTextField.bottom + 20, width: view.width - 40, height: 20)
        DatePicker.frame = CGRect(x: 20, y: Label4.bottom + 10, width: view.width - 40, height: 40)
        ProgressView.frame = CGRect(x: 20, y: DatePicker.bottom + 40, width: view.width - 40, height: 60)
        Continue.frame = CGRect(x: 20, y: ProgressView.bottom + 40, width: view.width - 40, height: 60)
    }
    
//    @objc func takeDate() {
//        print(DatePicker.date)
//    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
<file_sep>/UIElements/UIElements/screen2VC.swift
//
//  screen2VC.swift
//  UIElements
//
//  Created by srk on 20/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class screen2VC: UIViewController {

    private let ImageView:UIImageView = {
        let imageView = UIImageView()
        imageView.contentMode = .scaleAspectFill
        imageView.clipsToBounds = true
        imageView.image = UIImage(named: "set2")
        return imageView
    }()
    
    private let Label:UILabel = {
        let label = UILabel()
        label.text = "Rate Us"
        label.textColor = UIColor.white
        label.font = UIFont.boldSystemFont(ofSize: 40)
        //        label.textAlignment = .center
        return label
    }()
    
    private let Slider:UISlider = {
        let slider = UISlider()
        slider.minimumValue = 0
        slider.maximumValue = 10
        slider.addTarget(self, action: #selector(rateUs), for: .valueChanged)
        return slider
    }()
    
    private let RateTextView:UITextView = {
        let textView = UITextView()
//        textView.text = "Enter Your Name"
        textView.font = UIFont.systemFont(ofSize: 20)
        textView.textAlignment = .center
        textView.backgroundColor = #colorLiteral(red: 0.9637209141, green: 0.9637209141, blue: 0.9637209141, alpha: 1)
        textView.layer.cornerRadius = 20
        return textView
    }()
    
    @objc func rateUs(){
        let rate = Int(Slider.value)
        RateTextView.text = String(rate)
    }
    
    private let Continue:UIButton = {
        let button = UIButton()
        button.setTitle("Continue...", for: .normal)
        button.addTarget(self, action: #selector(moveTo), for: .touchUpInside)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        return button
    }()
    
    @objc func moveTo() {
        let vc = screen3VC()
        navigationController?.pushViewController(vc, animated: true)
        navigationController?.navigationBar.backgroundColor = #colorLiteral(red: 0.143452806, green: 0.1553194879, blue: 0.1725588291, alpha: 1)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "Rate Us"
        view.addSubview(ImageView)
        view.addSubview(Label)
        view.addSubview(Slider)
        view.addSubview(RateTextView)
        view.addSubview(Continue)
        // Do any additional setup after loading the view.
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        ImageView.frame = CGRect(x: 60, y: 200, width: 300, height: 300)
        Label.frame = CGRect(x: 130, y: ImageView.bottom + 40, width: view.width - 40, height: 40)
        Slider.frame = CGRect(x: 20, y: Label.bottom + 40, width: view.width - 40, height: 40)
        RateTextView.frame = CGRect(x: 20, y: Slider.bottom + 40, width: view.width - 40, height: 40)
        Continue.frame = CGRect(x: 20, y: RateTextView.bottom + 40, width: view.width - 40, height: 60)
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
<file_sep>/UIElements/UIElements/screen6VC.swift
//
//  screen6VC.swift
//  UIElements
//
//  Created by srk on 21/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class screen6VC: UIViewController {
    
    private let toolBar:UIToolbar = {
        let toolBar = UIToolbar()
        let cancel = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(handleCancel))
        let spacer = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
        let gallery = UIBarButtonItem(barButtonSystemItem: .organize, target: self, action: #selector(handleGallery))
        toolBar.items = [cancel, spacer, gallery]
        return toolBar
    }()
    
    @objc private func handleCancel() {
        print("cancel called")
        self.dismiss(animated: true)
    }
    
    @objc private func handleGallery() {
        print("gallery called")
        imagePicker.sourceType = .photoLibrary
        DispatchQueue.main.async {
            self.present(self.imagePicker, animated: true)
        }
    }
    
    private let tabBar:UITabBar = {
        let tabBar = UITabBar()
        let history = UITabBarItem(tabBarSystemItem: .history, tag: 1)
        let downloads = UITabBarItem(tabBarSystemItem: .downloads, tag: 2)
        tabBar.items = [history, downloads]
        return tabBar
    }()
    
    private let ImageView:UIImageView = {
        let imageView = UIImageView()
        imageView.contentMode = .scaleAspectFill
        imageView.image = UIImage(named: "set4")
        return imageView
    }()
    
    private let imagePicker:UIImagePickerController = {
        let imgpicker = UIImagePickerController()
        imgpicker.allowsEditing = true
        return imgpicker
    }()
    
    private let myLabel:UILabel = {
        let label = UILabel()
        label.text = "Choose Your Profile Here"
        label.textAlignment = .center
        label.textColor = UIColor.white
        label.font = UIFont.boldSystemFont(ofSize: 30)
        return label
    }()
    
    private let Continue:UIButton = {
        let button = UIButton()
        button.setTitle("Register", for: .normal)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        return button
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "Set Profile"
        view.addSubview(toolBar)
        view.addSubview(tabBar)
        view.addSubview(ImageView)
        view.addSubview(myLabel)
        view.addSubview(Continue)
        tabBar.delegate = self
        imagePicker.delegate = self
        // Do any additional setup after loading the view.
    }
    
  
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        let toolBarHeight:CGFloat = view.safeAreaInsets.top + 40
        toolBar.frame = CGRect(x: 0, y: 0, width: view.width, height: toolBarHeight)
        
        let tabBarHeight:CGFloat = view.safeAreaInsets.bottom + 49
        tabBar.frame = CGRect(x: 0, y: view.height - tabBarHeight, width: view.width, height: tabBarHeight)
        
        ImageView.frame = CGRect(x: 90, y: toolBar.bottom + 40, width: 200, height: 200)
        
        myLabel.frame = CGRect(x: 20, y: ImageView.bottom + 20, width: view.width - 40, height: 40)
        Continue.frame = CGRect(x: 20, y: myLabel.bottom + 40, width: view.width - 40, height: 60)
    }
    
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
extension screen6VC: UITabBarDelegate {
    func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
        print(item.tag)
    }
}

extension screen6VC:UIImagePickerControllerDelegate, UINavigationControllerDelegate {
    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
        
        if let selectedImage = info[.originalImage] as? UIImage {
            ImageView.image = selectedImage
        }
        
        picker.dismiss(animated: true)
    }
    
    func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
        picker.dismiss(animated: true)
    }
}
<file_sep>/UIElements/UIElements/screen3VC.swift
//
//  screen3VC.swift
//  UIElements
//
//  Created by srk on 20/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class screen3VC: UIViewController {
    
    private let ImageView:UIImageView = {
        let imageView = UIImageView()
        imageView.contentMode = .scaleAspectFill
        imageView.clipsToBounds = true
        imageView.image = UIImage(named: "set3")
        return imageView
    }()
    
    private let Label:UILabel = {
        let label = UILabel()
        label.text = "Turn On Your Notifications!"
        label.textColor = UIColor.white
        label.font = UIFont.boldSystemFont(ofSize: 30)
        return label
    }()
    
    private let Switch:UISwitch = {
        let switcher = UISwitch()
        return switcher
    }()
    
    private let Continue:UIButton = {
        let button = UIButton()
        button.setTitle("Continue...", for: .normal)
        button.addTarget(self, action: #selector(moveTo), for: .touchUpInside)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        return button
    }()
    
    @objc func moveTo() {
        let vc = screen4VC()
        navigationController?.pushViewController(vc, animated: true)
        navigationController?.navigationBar.backgroundColor = #colorLiteral(red: 0.143452806, green: 0.1553194879, blue: 0.1725588291, alpha: 1)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "Notification Setting"
        view.addSubview(ImageView)
        view.addSubview(Label)
        view.addSubview(Switch)
        view.addSubview(Continue)
        // Do any additional setup after loading the view.
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        ImageView.frame = CGRect(x: 50, y: 200, width: 300, height: 300)
        Label.frame = CGRect(x: 30, y: ImageView.bottom + 40, width: view.width - 40, height: 40)
        Switch.frame = CGRect(x: 180, y: Label.bottom + 20, width: view.width - 160, height: 40)
        Continue.frame = CGRect(x: 20, y: Switch.bottom + 60, width: view.width - 40, height: 60)
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
<file_sep>/UIElements/UIElements/mainVC.swift
//
//  mainVC.swift
//  UIElements
//
//  Created by srk on 19/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class mainVC: UIViewController {
    
    private let ImageView:UIImageView = {
        let imageView = UIImageView()
        imageView.contentMode = .scaleAspectFill
        imageView.clipsToBounds = true
        imageView.image = UIImage(named: "set1")
        return imageView
    }()
    
    private let Label1:UILabel = {
        let label = UILabel()
        label.text = "Hello!"
        label.textColor = UIColor.white
        label.font = UIFont.boldSystemFont(ofSize: 40)
//        label.textAlignment = .center
        return label
    }()
    
    private let Label2:UILabel = {
        let label = UILabel()
        label.text = "Let's Get"
        label.textColor = UIColor.white
        label.font = UIFont.boldSystemFont(ofSize: 40)
        //        label.textAlignment = .center
        return label
    }()
    
    private let Label3:UILabel = {
        let label = UILabel()
        label.text = "Started"
        label.textColor = UIColor.white
        label.font = UIFont.boldSystemFont(ofSize: 40)
        //        label.textAlignment = .center
        return label
    }()
    
    private let SignUp:UIButton = {
        let button = UIButton()
        button.setTitle("Sign Up", for: .normal)
        button.addTarget(self, action: #selector(moveTo), for: .touchUpInside)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        return button
    }()
    
    @objc func moveTo() {
        let vc = screen1VC()
        navigationController?.pushViewController(vc, animated: true)
        navigationController?.navigationBar.backgroundColor = #colorLiteral(red: 0.143452806, green: 0.1553194879, blue: 0.1725588291, alpha: 1)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = #colorLiteral(red: 0.05821686248, green: 0.05879326706, blue: 0.05879326706, alpha: 1)
        self.navigationController?.navigationBar.backgroundColor = #colorLiteral(red: 0.2549019754, green: 0.2745098174, blue: 0.3019607961, alpha: 1)
        view.addSubview(ImageView)
        view.addSubview(SignUp)
        view.addSubview(Label1)
        view.addSubview(Label2)
        view.addSubview(Label3)
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        ImageView.frame = CGRect(x: 50, y: 200, width: 300, height: 300)
        Label1.frame = CGRect(x: 30, y: ImageView.bottom + 60, width: view.width - 40, height: 40)
        Label2.frame = CGRect(x: 30, y: Label1.bottom + 10, width: view.width - 40, height: 40)
        Label3.frame = CGRect(x: 30, y: Label2.bottom + 10, width: view.width - 40, height: 40)
        SignUp.frame = CGRect(x: 20, y: Label3.bottom + 30, width: view.width - 40, height: 60)
    }
    
}

<file_sep>/README.md
# UIElements Foodie iOS App

## Foodie App
### Welcome To The Food World

## Emphasis
*It's a small work app for assignment*

### Elements

* UILabel
* UITextField
* UITextView
* UIButton
* UIDatePicker
* UISegmentedControl
* UISlider
* UIStepper
* UISwitch
* UIActivityIndicatorView
* UIImageView
* UIProgressView
* UIPickerView
* UIToolbar
* UITabBar
* UIImagePickerController

## Screenshots

![1](https://user-images.githubusercontent.com/81278594/122809327-97271300-d2eb-11eb-83d7-2347829cfa9a.png)

![2](https://user-images.githubusercontent.com/81278594/122809403-b45be180-d2eb-11eb-8096-dbc134fd1853.png)

![3](https://user-images.githubusercontent.com/81278594/122809424-baea5900-d2eb-11eb-8ba3-855c0fbaaee3.png)

![4](https://user-images.githubusercontent.com/81278594/122809431-bcb41c80-d2eb-11eb-992c-925bdbd752b3.png)

![5](https://user-images.githubusercontent.com/81278594/122809439-bf167680-d2eb-11eb-8a21-6e7d96d78878.png)

![6](https://user-images.githubusercontent.com/81278594/122809446-c047a380-d2eb-11eb-8811-6a741dfb6adc.png)

![7](https://user-images.githubusercontent.com/81278594/122809451-c2116700-d2eb-11eb-96a3-fe87f8963ea1.png)

![8](https://user-images.githubusercontent.com/81278594/122809458-c3429400-d2eb-11eb-9005-e92e94bde10a.png)

<file_sep>/UIElements/UIElements/screen5VC.swift
//
//  screen5VC.swift
//  UIElements
//
//  Created by srk on 21/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class screen5VC: UIViewController {
    
    private let Label1:UILabel = {
        let label = UILabel()
        label.text = "Select Your Destination"
        label.textColor = UIColor.black
        label.textAlignment = .center
        label.font = UIFont.boldSystemFont(ofSize: 30)
        return label
    }()
    
    private let PickerView = UIPickerView()
    private let pickerData = ["Varachha", "Vesu", "Udhana", "Adajan", "Muglisarai"]
    
    private let Continue:UIButton = {
        let button = UIButton()
        button.setTitle("Continue...", for: .normal)
        button.addTarget(self, action: #selector(moveTo), for: .touchUpInside)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        return button
    }()
    
    @objc func moveTo() {
        let vc = screen6VC()
        navigationController?.pushViewController(vc, animated: true)
        let nav = UINavigationController(rootViewController: vc)
        nav.modalPresentationStyle = .fullScreen
        nav.setNavigationBarHidden(true, animated: false)
        present(nav, animated: false)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "Destination"
        view.backgroundColor = UIColor.white
        view.addSubview(Label1)
        view.addSubview(PickerView)
        view.addSubview(Continue)
        PickerView.dataSource = self
        PickerView.delegate = self
        // Do any additional setup after loading the view.
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        Label1.frame = CGRect(x: 20, y: 120, width: view.width - 40, height: 40)
        PickerView.frame = CGRect(x: 20, y: Label1.bottom + 20, width: view.width - 40, height: 50)
        Continue.frame = CGRect(x: 20, y: PickerView.bottom + 40, width: view.width - 40, height: 60)
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}

extension screen5VC: UIPickerViewDataSource, UIPickerViewDelegate {
    func numberOfComponents(in pickerView: UIPickerView) -> Int {
        return 1
    }
    
    func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
        return pickerData.count
    }
    
    func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
        return pickerData[row]
    }
    
    func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
        print(pickerData[row])
    }
}
<file_sep>/UIElements/UIElements/screen4VC.swift
//
//  screen4VC.swift
//  UIElements
//
//  Created by srk on 21/06/21.
//  Copyright © 2021 Nikunj. All rights reserved.
//

import UIKit

class screen4VC: UIViewController {

    private let Label1:UILabel = {
        let label = UILabel()
        label.text = "More Details..."
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 40)
        //        label.textAlignment = .center
        return label
    }()
    
    private let Label2:UILabel = {
        let label = UILabel()
        label.text = "Gender"
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 20)
        return label
    }()
    
    private let SegmentedControl:UISegmentedControl = {
        let segControl = UISegmentedControl()
        segControl.insertSegment(withTitle: "Male", at: 0, animated: true)
        segControl.insertSegment(withTitle: "Female", at: 1, animated: true)
        return segControl
    }()
    
    private let Label3:UILabel = {
        let label = UILabel()
        label.text = "Height"
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 20)
        return label
    }()
    
    private let TextView:UITextView = {
        let textView = UITextView()
        textView.text = ""
        textView.font = UIFont.systemFont(ofSize: 20)
        textView.textAlignment = .center
        textView.backgroundColor = #colorLiteral(red: 0.9637209141, green: 0.9637209141, blue: 0.9637209141, alpha: 1)
        textView.layer.cornerRadius = 20
        return textView
    }()
    
    private let Stepper:UIStepper = {
        let stepper = UIStepper()
        stepper.minimumValue = 0
        stepper.maximumValue = 10
        stepper.addTarget(self, action: #selector(takeHeight), for: .valueChanged)
        return stepper
    }()
    
    @objc func takeHeight(){
        let height = Stepper.value
        TextView.text = String(height)
        ActivityIndicatorView.isHidden = true
        ActivityIndicatorView.stopAnimating()
        Continue.isHidden = false
    }
    
    private let ActivityIndicatorView:UIActivityIndicatorView = {
        let activity = UIActivityIndicatorView()
        activity.color = UIColor.black
        activity.startAnimating()
        return activity
    }()
    
    private let Continue:UIButton = {
        let button = UIButton()
        button.setTitle("Continue...", for: .normal)
        button.addTarget(self, action: #selector(moveTo), for: .touchUpInside)
        button.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
        button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 40)
        button.layer.cornerRadius = 20
        button.isHidden = true
        return button
    }()
    
    @objc func moveTo() {
        let vc = screen5VC()
        navigationController?.pushViewController(vc, animated: true)
        navigationController?.navigationBar.backgroundColor = #colorLiteral(red: 0.143452806, green: 0.1553194879, blue: 0.1725588291, alpha: 1)
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "Personal Details"
        view.backgroundColor = UIColor.white
        view.addSubview(Label1)
        view.addSubview(Label2)
        view.addSubview(SegmentedControl)
        view.addSubview(TextView)
        view.addSubview(Label3)
        view.addSubview(Stepper)
        view.addSubview(ActivityIndicatorView)
        view.addSubview(Continue)
        // Do any additional setup after loading the view.
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        Label1.frame = CGRect(x: 30, y: 120, width: view.width - 40, height: 50)
        Label2.frame = CGRect(x: 20, y: Label1.bottom + 20, width: view.width - 40, height: 20)
        SegmentedControl.frame = CGRect(x: 20, y: Label2.bottom + 20, width: view.width - 40, height: 40)
        Label3.frame = CGRect(x: 20, y: SegmentedControl.bottom + 30, width: view.width - 40, height: 20)
        TextView.frame = CGRect(x: 20, y: Label3.bottom + 20, width: view.width - 160, height: 40)
        Stepper.frame = CGRect(x: 300, y: 350, width: view.width - 40, height: 50)
        ActivityIndicatorView.frame = CGRect(x: 30, y: Stepper.bottom + 20, width: view.width - 40, height: 40)
        Continue.frame = CGRect(x: 20, y: ActivityIndicatorView.bottom + 40, width: view.width - 40, height: 60)
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
