ApplicationEntry 1.0.3

ApplicationEntry 1.0.3

Kalanhall 维护。



ApplicationEntry

CI Status Version License Platform

image image image image image image image

示例

*** 闲鱼:中间按钮凸起,交互参考 XianYuTabBarController.swift

barAppearance(attributes: [
    TabAppearanceType
    .titleTextAttributes: [([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 11)], UIControl.State.normal),
                            ([NSAttributedString.Key.foregroundColor: UIColor.black], .normal),
                            ([NSAttributedString.Key.foregroundColor: UIColor.black], .selected)],
    .titlePositionAdjustment: UIOffset(horizontal: 0, vertical: -3),
    .imageInsets: (UIEdgeInsets(top: -3, left: 0, bottom: 3, right: 0), UIEdgeInsets(top: -15, left: 0, bottom: 15, right: 0), [2]), // 中间按钮图片调整
    .shadowImage: extension_imageWith(UIColor.clear, size: CGSize(width: 0.5, height: 0.5))!,
    .backgroundImage: extension_imageWith(UIColor.white, size: CGSize(width: 1, height: 1))!
])

let item = HotBtn(type: .custom)
item.addTarget(self, action: #selector(itemSelected), for: .touchUpInside)
overlayTabBarItem(item, index: 2, height: 74)

*** 京东:Lottie动画,动画交互参考 JingDongTabBarController.swift

barAppearance(attributes: [
    TabAppearanceType
    .backgroundImage: extension_imageWith(.white, size: CGSize(width: 1, height: 1))!
])

let jsons: [String] = ["home", "category", "discover", "cart", "user"]
overlayItems = overlayItems(jsons: jsons)
guard overlayItems != nil else {
    return
}
overlayTabBarItems(overlayItems!, systemItemEndable: false)

*** 小红书:自定义按钮,交互参考 HotBookTabBarController.swift

barAppearance(attributes: [
    TabAppearanceType
    .shadowImage: extension_imageWith(.clear, size: CGSize(width: 0.5, height: 0.5))!,
    .backgroundImage: extension_imageWith(.white, size: CGSize(width: 1, height: 1))!
])
let titles: [String] = ["首页", "商城", "", "消息", "我"]
let items = overlayItems(titles: titles)
overlayTabBarItems(items!, systemItemEndable: false)

要求

安装

ApplicationEntry可以通过CocoaPods获得。要安装它,只需在Podfile中添加以下行

pod 'ApplicationEntry'

作者

[email protected][email protected]

许可证

ApplicationEntry可在MIT许可证下使用。有关更多信息,请参阅LICENSE文件。