长行的滑动操作按钮位置 [英] Swipe actions buttons locations for long rows

查看:19
本文介绍了长行的滑动操作按钮位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开展一个项目,我正在为一些附加操作实施滑动菜单选项.当行的高度相对较小且用户位于行的中间时,一切正常.但是当高度增加时,特别是当它覆盖整个页面并且用户滚动到一半时,它有点破坏设计.这是这两个操作的屏幕截图.

[当用户在行中间时,顶部的图像显示菜单.当他滚动到一半时显示第二张图片][2]

我的问题是,有没有办法在用户滚动时将操作按钮与页面一起向下移动,以便它们始终可见?

注意:我使用的是 mgswipeTableCell 库.

解决方案

正如你在 官方项目 有 3 个可用的演示,每个演示都有一个基于 MGSwipeTableCell 方法的自定义 UITableViewCell 单元.如果您不方便使用 UITableViewCell 子类化,它就不会简单.您可以尝试按照 MGSwipeTableCell 项目说明进行操作.您想要的是使单元格标签多于 2 或 3 行,并且按钮垂直居中对齐.

最接近您需求的演示是邮件演示

I am working on a project where I am implementing a swipe menu option for some additional actions. Everything works fine when the height of rows is relatively small and the user is in the middle of the row. But when the height increases, specially when it covers the whole page and the user has scrolled half way, it kind of breaks the design. Here are the screenshots for both actions.

[The image at the top shows the menu when the user is in the middle of the row. The second image show when he has scrolled half way][2]

My questions is, is there a way to move the actions button down with the page when the user scrolls so they are always visible?

NOTE: I am using the mgswipeTableCell lib.

解决方案

As you can see in the official project there are 3 available demo, each demo have a custom UITableViewCell cell based on MGSwipeTableCell methods. It can't be simple if you don't have convenience with UITableViewCell subclassing. You can try to following MGSwipeTableCell project instructions. What do you want is to make cell labels with more than 2 or 3 lines and with the buttons vertical center aligned.

The demo who is near your needs is Mail Demo

这篇关于长行的滑动操作按钮位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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