分段控制以切换多个表视图 [英] Segmented control to toggle through multiple tableviews

查看:132
本文介绍了分段控制以切换多个表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我基本上尝试的是在邮箱中实现控制段/ tableview(请参阅2:00左右: http://www.youtube.com/watch?v=FG-h8pDXfoE&feature=youtu.be&t=2m

What I’m basically trying to is to implement the control segment/tableview as in Mailbox (see it around 2:00: http://www.youtube.com/watch?v=FG-h8pDXfoE&feature=youtu.be&t=2m)

我在一个 UITableViewController 中使用Core Data连接到 UITableView

I am using Core Data in one UITableViewController hooked up to a UITableView.

当用户切换 UISegmentedControl 时, TableView 重新加载了一组不同的 NSPredicate ,以及 UITableViewRowAnimationRight / Left ,有点让它看起来像一个不同的表视图滑入并替换旧的。

When user toggles the UISegmentedControl, the TableView is reloaded with a different set of NSPredicate, and UITableViewRowAnimationRight/Left, kind of makes it appear that that a different table view slides in and replaces the old one.

随着单元格数量的增加,这种设计的性能急剧下降,它看起来也会更好。

As the number of cells increase, the performance of this design decrease dramatically, and it could also look much better.

我可以看到一些不同的方法,但我想我会问你们一些指示让我在ri ght direction:

I can see a few different ways of going about it, but I figured I'd ask you guys for some pointers to head me in the right direction:

分段控件切换多个tableview的最佳方法是什么?这些tableviews应该连接到同一个数据源/委托吗?

推荐答案

看一下这个pod:< a href =https://github.com/xmartlabs/XLMailBoxContainer =nofollow> https://github.com/xmartlabs/XLMailBoxContainer 。它在视图控制器中创建UI动画。这些视图控制器可以扩展UITableViewController或任何其他视图控制器。

Take a look at this pod: https://github.com/xmartlabs/XLMailBoxContainer. It makes the UI animation among the view controllers. These view controller can extend UITableViewController or any other view controller.

UITableViewCell滑动动画可以使用 https://github.com/alikaragoz/MCSwipeTableViewCell

UITableViewCell swipe animation can be accomplished using https://github.com/alikaragoz/MCSwipeTableViewCell.

我希望这可以帮到你!

这篇关于分段控制以切换多个表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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