开发者

Adding UIPickerView as superview to TableView?

So in didSelectRowAtIndexPath im using [self.tableView addSubview:picker] to add a picker into superview of the table.

The problem is, that I can't select any row in the pickerView, because any finger swipe over the picker makes the tableView scroll/bounce, together with the picker, but the picker itself does not scroll its selection. 开发者_高级运维The pickerView is basically unusable like this. Is there any other way of subviewing the picker, so that it really is in front of the TableView, and doesn't scroll with it?

Note that [self.view addSubview:picker] isn't working as well.


Try to add it to your view:

[self.view addSubview:picker];

If view is not your tableView...

Updated:

Then I suggest to create UIView, on it put your UITableView and then put UIView with backgroundColor=[UIColor clearColor]; and finally put UIPickerView.


Add it to your navigation controller view and everything will work fine :D

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜