- August 20, 2025
- Mins Read
đA simple NoticeBar written by Swift 3, similar with QQ notice view.đ
Remember: If you want the status bar style change, you must set the View controller-based status bar appearance
 to NO
 in the info.plist
.
Swift 3.0 & iOS 8+
pod 'NoticeBar'
 to your Podfile.pod install
 OR pod update
.import Noticebar
github "qiuncheng/Noticebar" ~> 0.1.5
carthage update
import NoticeBar
How to use? For example: ->Â NoticeBarAnimationType.info
:
/// title : The message you want to show
/// defaultType : Above four types with different style above.
let noticeBar = NoticeBar(title: “#message”, defaultType:.info)
/// duration : How long the noticeBar will stay. And it will dismiss automatically.
/// completed :optional. When the noticeBar dismissed, what you want to do, nothing type nil.
noticeBar.show(duration: #TimeInterval, completed: { (#Bool) in
})
The NoticeBarConfig will manage the NoticeBar’s title
 default is nil
, image
 if needed, textColor
 default is UIColor.black
, backgroundColor
 default is UIColor.white
, animationType
 default is from NoticeBarAnimationType.top
, barStyle
 default is NoticeBarStyle.onNavigationBar
, margin
 default is 10.0
 which will determine the space between image
 and title
, the space between NoticeBar left
 and image
.
How to use? For example:
/// NoticeBarConfig : There are some other NoticeBarConfig init, it’s up to you which to use.
let config = NoticeBarConfig(title: “#message you want to show.”, image: #image, textColor: UIColor.white, backgroundColor: UIColor.red, barStyle: NoticeBarStyle.onNavigationBar, animationType: NoticeBarAnimationType.top )
let noticeBar = NoticeBar(config: config)
/// do something before noticeBar show.
/// such as : UIApplication.shared.statusBarStyle = .lightContent
noticeBar.show(duration: 2.0, completed: {
(finished) in
if finished {
/// do something here.
/// such as : UIApplication.shared.statusBarStyle = .default
}
})
Format phone numbers as they're typedâentirely in SwiftUI. đą Get Started | Examples | Customize | Features | Install | Pricing And it's as easy as
CurrencyText provides lightweight libraries for formating text field text as currency, available for both UIKit and SwiftUI. Its main core, the CurrencyFormatter class, can also ...
SlidingTabView is a simple Android-Like tab view that is built using the latest and greatest SwiftUI. Almost everything is customizable! Installation ...
A SwiftUI UITabBarController implementation that retains state between tab changes. Big thanks to Amzd and everyone who helped to refine this gist as it ...