HJToast
is a customised library for Toast or SnackBar, that comes with powerful feature of accessory views. It can be used to display the short messages or events over the view.
Xcode 7.0+ and Swift 2.0
Coming soon..
CocoaPods is the recommended way to add HJToast to your project.
- Add a pod entry for HJToast to your Podfile
pod 'HJToast'
- Install the pod by running
pod install
. - Include HJToast wherever you need it with
import HJToast
.
font - The font for the displayed message (default: system-regular-12.0pt)
textColor - Text color for the displayed message (default: whiteColor)
textAlignment - Text Alignment for displayed message (default: Center)
toastDuration - Duration for which toast will present in view (default: Text reading time)
animateDuration - Duration of animation while toast will slide up and down (default: 0.25)
edgeInsets - Edge insets for toast subviews (default: UIEdgeInsetsMake(10, 10, 10, 10))
leftView - Optional left view for toast
rightView - Optional right view to toast
To run the example project, clone the repo, and run pod install
from the Example directory first.
Himanshu Joshi
HJToast is available under the MIT license. See the LICENSE file for more info.