     func numberOfComponents(in pickerView: UIPickerView) -> Int {
         return 1
     }
+
     func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
 
         if pickerView == typeOfSpace {
             return noOfTypes.count
         } else if pickerView == noOfBedroomPicker {
-            return noOfBedrooms.count
+            return defaultBedAndWashrooms.count
         } else if pickerView == noOfWashroomsPicker {
-            return noOfWashrooms.count
+            return defaultBedAndWashrooms.count
         }
+
         return 0
     }
 

        if pickerView == typeOfSpace {
            return noOfTypes[row]
        } else if pickerView == noOfBedroomPicker {
            return noOfBedrooms[row]
        } else if pickerView == noOfWashroomsPicker {
            return noOfWashrooms[row]
        }
        return nil
    }

import UIKit

class AddNewPostViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
    @IBOutlet weak var typeOfSpace: UIPickerView!
    @IBOutlet weak var noOfBedroomPicker: UIPickerView!
    @IBOutlet weak var noOfWashroomsPicker: UIPickerView!
    @IBOutlet weak var datePicker: UIDatePicker!
    @IBOutlet weak var totalPriceLabel: UILabel!
    @IBOutlet weak var addressTxtView: UITextField!
    @IBOutlet weak var zipcodeTxtView: UITextField!

    let noOfTypes: [String] = ["House", "Condo"]
    let defaultBedAndWashrooms: [Int] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

    let bedroomPrice = 10
    let washroomPrice = 10

    override func viewDidLoad() {
        super.viewDidLoad()
