CardStyleTableView
UITableView 和 UITableViewCell 的扩展,在分组 tableView 中显示卡片样式视图,类似于 iOS 7 之前的系统 tableView。
如何开始使用
Carthage
在你的 Cartfile
中指定 "CardStyleTableView"。
github "teambition/CardStyleTableView"
CocoaPods(版本等于或高于 0.1.4)
CocoaPods 是 Cocoa 项目的依赖管理器。您可以使用以下命令安装它:
$ gem install cocoapods
要使用 CocoaPods 将功能集成到您的 Xcode 项目中,请在您的 Podfile
中指定它:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'TBCardStyleTableView, '~> 0.1.4'
然后,运行以下命令:
$ pod install
使用
导入CardStyleTableView
import CardStyleTableView
AppDelegate
中配置
在您的func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
CardStyle.setup()
return true
}
分配代理
tableView.cardStyleSource = self
CardStyleTableView样式源
func roundingCornersForCard(inSection section: Int) -> UIRectCorner {
// set rounding corners of this section, default is .allCorners
}
func leftPaddingForCardStyleTableView() -> CGFloat {
// leftPadding
}
func rightPaddingForCardStyleTableView() -> CGFloat {
// rightPadding
}
func cornerRadiusForCardStyleTableView() -> CGFloat {
// cornerRadius
}
最低要求
iOS 8.0
发布说明
许可证
CardStyleTableView是在MIT许可下发布的。详细信息请参阅LICENSE。
更多信息
有疑问吗?请新建一个问题!