0
Hello.
I’m trying to work with Picker View to display a combination of values.
var pickerDataSource = [["a", "b", "c", "d"],["1","2","3","4"]];
Doubt is; how are results within a condition?
if(row == 0)
{
self.view.backgroundColor = UIColor.whiteColor();
}
else
if(row == 1)
{
self.view.backgroundColor = UIColor.redColor();
}
else if(row == 1)
{
self.view.backgroundColor = UIColor.greenColor();
}
else if(row == 3)
{
self.view.backgroundColor = UIColor.blueColor();
}
else
{
self.view.backgroundColor = UIColor.blueColor();
}
}
You put it twice
else if (row == 1)
. The second condition will never be executed.– Leo Dabus