[翻译] AnchoredFloatView

简介:

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)

 

目录
相关文章
|
存储 自然语言处理 前端开发
从零写一个Recoil(翻译)
Rewriting Recoil from scratchrecoil是facebook编写的一个库,它之所以诞生是因为人体工程学、context的性能问题和useState。这是一个非常聪明的库,几乎每个人都会找到它的用途——如果你想了解更多,请查看这段解释视频。刚开始我被图论和recoil惊到了,但渐渐的理解后,感觉也没那么特别了。也许我也可以实现一个类似的东西。我自己实现的版本和recoil
198 0
从零写一个Recoil(翻译)
《Wir wilden weisen Frauen》翻译——<连载>
上周去逛图书馆,借了本德语原版的书。今天突然想起来了,就翻开来看。我不知道这本书是否有中文版的,不管有没有吧,我尝试翻译一下以提高自身的德语水平。每天花上一个半小时来翻译,我想应该不能翻译出来几句的。
767 0
|
C# iOS开发 Perl
|
缓存 API iOS开发
|
iOS开发 编译器 Go