Content in PickerView not showing up swift 4 : I am new with programming in Swift. i got problem when i want to show up 2 different picker with 2 different content. But it show (?) instead of content. 

see the screenshoot below

[enter image description here][1]

Thank your for help!

    let fruit = ["apple", "orange", "watermelon", "banana", "peach", "strawberry"]
    let food = ["rice","bread","spagheti","milk"]
    
    }
    
    func numberOfComponents(in pickerView: UIPickerView) -> Int {
        return 1
        
    }
    
    func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
         if (pickerView.tag == 1) {
            return fruit.count
            
        }
        else {
            return food.count
            
            func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
                if (pickerView.tag == 1) {
                    return fruit[row]
                }
                else {
                    return food[row]
                }
            }


  [1]: https://i.stack.imgur.com/xiyEw.png