         if pickerView == typeOfSpace {
             return noOfTypes[row]
         } else if pickerView == noOfBedroomPicker {
-            return noOfBedrooms[row]
+            return String(defaultBedAndWashrooms[row])
         } else if pickerView == noOfWashroomsPicker {
-            return noOfWashrooms[row]
+            return String(defaultBedAndWashrooms[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!

    var noOfTypes: [String] = [String]()
    var noOfBedrooms: [String] = [String]()
    var noOfWashrooms: [String] = [String]()

    var bedroomPrice = 10
    var washroomPrice = 10

    override func viewDidLoad() {
        super.viewDidLoad()

    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 defaultBedAndWashrooms.count
        } else if pickerView == noOfWashroomsPicker {
            return defaultBedAndWashrooms.count
        }

        return 0
    }

