Kashif
Kashif

Reputation: 4632

How to remove gap between UIPickerView Components of different background colors

I am using different background colors for each component of a UIPickerView. There is a white gap between each compnent. I want to remove that.

func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat {

does not seem to help.

Upvotes: 0

Views: 735

Answers (1)

Jasmeet Kaur
Jasmeet Kaur

Reputation: 1568

you can set pickerView background color as clear color and add n numbers of views of equal width behind the picker view where n is number of component.UIPickerView with different background color component

Upvotes: 1

Related Questions