Adrian B.. 的评论中已经给出了您的答案。
我会向你解释你必须如何去做。首先它被称为 Tab Swipe 导航
利用碳套件
https://github.com/melieskubrick/CarbonKitSwift
所以首先将元素添加到您的视图中。这就是您使用 Carbon Kit
添加的方式
override func viewDidLoad() {
super.viewDidLoad()
self.title = "CarbonKit"
items = [UIImage(named: "home")!, UIImage(named: "hourglass")!, UIImage(named: "premium_badge")!, "Categories", "Top Free", "Top New Free", "Top Paid", "Top New Paid"]
carbonTabSwipeNavigation = CarbonTabSwipeNavigation(items: items as [AnyObject], delegate: self)
carbonTabSwipeNavigation.insertIntoRootViewController(self)
self.style()
}
您想刷新您的新闻,因此使用 Carbon Kit 的委托方法 CarbonTabSwipeNavigationDelegate 您可以刷新您的表格视图。
func carbonTabSwipeNavigation(carbonTabSwipeNavigation: CarbonTabSwipeNavigation, viewControllerAtIndex index: UInt) -> UIViewController {
switch index {
case 0:
//Do your table view refresh here Business category
case 1:
//Do your table view refresh here other category
default:
//Do your table view refresh here all category which will be default
}
}
信用