当触摸细胞时,使uipickerview出现在细胞之间 [英] make uipickerview appear between cells when touched cell

查看:88
本文介绍了当触摸细胞时,使uipickerview出现在细胞之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢像这个屏幕一样实现UI。

I like to implement UI like this screen.

如你所见,当我触摸特定的单元格时,pickerview会出现在该单元格的底部。
,它位于两个单元格之间。而pickerview似乎不是单元格的子视图。

as you see, when I touch a specific cell, pickerview appears at the bottom of that cell. and it sits between two cell. and pickerview doesn't seem to be a subview of cell.

我该如何实现?我不知道从哪里开始...

How do I implement this? I don't know where to start...

推荐答案

您可以插入一个新的单元格当用户使用此方法点击单元格时, UIPickerView -

You can insert a new cell which contains a UIPickerView when user tap on a cell by using this method -

- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation

同样为此你需要仔细处理你的数据结构,用它来填充你的 UITableView

Also for this you need to handle your data structure carefully by which you are populating your UITableView.

你可以结账这个仓库,它可能对你有帮助 -
https://github.com/saadnib/InsertPickerInTableView

You can checkout this repo, it might help you - https://github.com/saadnib/InsertPickerInTableView

这篇关于当触摸细胞时,使uipickerview出现在细胞之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆