AnchoredFloatView
Float View over TableView to indicate selected row direction
Float View 可以用来指示 TableView 中被选择的cell.
This is a Float View to indicate the direction and quickly scroll up or down to the TableView selected Row.
Float View 这是用来标示选中的cell,点击它后可以快速的移动到被选中cell上.
It basically consists of a custom UILabel with one fixed UIImageView inside it, on the left.
Float View 是由自定义的UILabel与一个左侧固定的UIImageView组成的.
Features
- automatically update label frame and align it on TableView bottom center 自动更新label的frame值并居中
- quickly scroll up or down the tableView to the selected row on click 点击后快速移动到之前你选中的cell上
- nice splash animation 华丽的移动动画
- rotation compatible 兼容横竖屏
Installation
Grab the files in View/AnchoredFloatView
and put it in your project. The code uses ARC, so make sure to turn that on for the files if you‘re not already using ARC.
将AnchoredFloatView拖到你的项目当中.这份代码是由ARC,所以,你要确保切换到ARC上去.
Usage
import the header class on your tableViewController:
将以下头文件导入你的项目当中:
#import "AnchoredFloatView.h"
alloc/init the view on viewDidLoad passing tableView and the indexPath of the selectedRow by parameter:
初始化view,然后将tableView与被选中的indexPath传递给这个view:
AnchoredFloatView *floatView = [[AnchoredFloatView alloc] initWithTableView:self.tableView andTargetIndexPath:self.targetIndexPath]; [self.view addSubview:floatView];
Small Print
License
AnchoredFloatView
is released under the MIT license.
AnchoredFloatView遵循MIT协议.
Author
Carlos Arantes (@carantes)