Why isn't the UIPickerView widthForComponent delegate method called everytime the view appears?

前端 未结 3 1974
慢半拍i
慢半拍i 2021-01-25 08:19

I\'ve got two controls on an iPhone screen - a TableView and a UIPickerView. When you select the single cell in the TableView you\'re taken to another screen where you\'re show

3条回答
  •  温柔的废话
    2021-01-25 08:30

    Actually, just using setNeedsLayout will also work and might be a bit cleaner.

    [picker reloadAllComponents];
    [picker setNeedsLayout];
    

提交回复
热议问题