在 UiTableView 上创建一个按钮 [英] Create a button on top of UiTableView

查看:29
本文介绍了在 UiTableView 上创建一个按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解 Facebook Messenger 如何在屏幕按钮上创建一个按钮,该按钮位于 UITableView 顶部并跟随滚动?

I am trying to understand how does Facebook Messenger create a button at the button of the screen which stays on top of the UITableView and follows the scrolling as well?

我想实现右下角的蓝色按钮.我应该采用什么方法来实现这样的目标?

I want to implement the blue button on the bottom right. What should be my approach to achieve something like that?

任何朝正确方向的推动都将受到高度赞赏.

Any push in the right direction will be highly appreciated.

推荐答案

在添加叠加视图时有一些方法可以采用:

There are a few avenues to take when adding the overlay view:

  • 作为包装UINavigationController的子视图,这意味着它不会随着表格的内容滚动

  • As a subview of the wrapping UINavigationController, which means it won't scroll with the content of the table

作为只有 1 个部分的纯样式 UITableView 的部分页脚

As a section footer of a plain-style UITableView that has only 1 section

作为 UITableView 的子视图并使用 UIScrollViewDelegatescrollViewDidScroll: 在用户滚动时不断更新视图的框架桌子(让它看起来一动不动)

As a subview of the UITableView and use UIScrollViewDelegate's scrollViewDidScroll: to continuously update the view's frame as the user scroll's the table (which makes it appear to stay motionless)

这篇关于在 UiTableView 上创建一个按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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