I have the following code for my UIPickerViews:
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int
{
if (pickerView == pckLanguage)
{
return 1;
}
else
{
assert(false);
}
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int
{
if (pickerView == pckLanguage)
{
return self.listOfLanguages.count
}
else
{
assert(false);
}
}
When I compile the application in Simulator or on my device, I have no problem. Tried to archive the application and it gave me errors:
Missing return in a function expected to return int.
Very weird. I did not have such problems in my other (Objective C) applications.
Thanks a lot in advance.