eggswift / ESTabBarController

:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie!
MIT License
5.18k stars 581 forks source link

请问一下,只有两个TabBarItem的时候,怎样调整它们之间的间距? #46

Closed HuangWei201703 closed 7 years ago

HuangWei201703 commented 7 years ago

如题

eggswift commented 7 years ago

Hi 目前不支持自定义间距,但是ESTabBarController提供了常见的布局方式:

/// 对原生的UITabBarItemPositioning进行扩展,通过UITabBarItemPositioning设置时,系统会自动添加insets,这使得添加背景样式的需求变得不可能实现。ESTabBarItemPositioning完全支持原有的item Position 类型,除此之外还支持完全fill模式。
///
/// - automatic: UITabBarItemPositioning.automatic
/// - fill: UITabBarItemPositioning.fill
/// - centered: UITabBarItemPositioning.centered
/// - fillExcludeSeparator: 完全fill模式,布局不覆盖tabBar顶部分割线
/// - fillIncludeSeparator: 完全fill模式,布局覆盖tabBar顶部分割线
public enum ESTabBarItemPositioning : Int {

    case automatic

    case fill

    case centered

    case fillExcludeSeparator

    case fillIncludeSeparator
}