SBBannerView 1.0.2

SBBannerView 1.0.2

Sanad Barjawi 维护。



  • Sanad.b

SBBannerView

适用于您的 iOS (iPhone, iPad) 项目的可完全自定义横幅

描述

SBBannerView 可用作您的网络连接指示器、通知警报、成功消息等 🧙🏻‍♀️

功能

  • 易于自定义(持续时间、位置、圆角半径、字体、宽度、高度、字体颜色、文本对齐方式)

  • 可以在动画新横幅之前重叠上一个横幅或取消显示当前横幅

  • SBBannerView 默认可滑动手势滑动,可使用滑动手势取消显示

SBBanner 以下是受尊重的

  • both safeAreas (top, bottom)

  • UITabBar

  • NavigationBar

位置(顶部,底部)

.top .bottom

持续时间(持久,临时)

.perminent .temporary(forTimer:_)

开始使用

依赖关系

  • 支持iOS,最低部署目标为“11.0”

安装过程

  • 使用CocoaPods
pod 'SBBannerView', :git => 'https://github.com/Sanadbarjawi/SBBannerView.git', :tag => 'v1.0.2'

程序执行

  • 如何运行程序

  • 简单地在您需要的文件中导入SBBannerView

  • 并使用单例#SBBannerManager#如下所示

// setup your configuration: 

let configuration = BannerConfiguration(backgroundColor: <UIColor>,
                                            position: <Position>,
                                            duration: <Duration>,
                                            message: <String>,
                                            textFont: <UIFont>,
                                            textColor: <UIColor>)
        
// Pass the *configuration* to the banner type:  


SBBannerManager.shared.slideIn(_ type: .basic(configuration: configuration), shouldSlideoutPreviousBannerIfFound: Bool)

// to slide out the banner:
SBBannerManager.shared.slideOut()

作者

贡献者姓名和联系方式

Sanad Barjawi

版本历史

  • 1.0.2 iPad支持
  • 1.0.1
  • 1.0.0

许可证

此项目受到MIT许可证授权