Skip to the content.

Loafjet ๐Ÿš€

Forks Stars Issues PRs Languages Version Badges Platform Relative date commit contributorsBadge badge size Watchers

About ๐Ÿ“’

Loafjet is a light weight Toast(Loaf) generator framework which allows the user to add customised Toasts to their projects. Loafjet comes with various types of Toast Animations as well as Toast Positions. It can be used to add gradient and plain toasts. Loafjet comes with extra features like Popup Card and Loading Indicator which can be customised according to your needs.

Our Simulation App is available on App Store, Go check it out

Now Customise Like Apple ๏ฃฟ !

Airpods Detection Silent Normal
Screenshot 2021-01-27 at 2 04 10 AM Screenshot 2021-01-27 at 2 04 10 AM Screenshot 2021-01-27 at 2 04 10 AM

Installation ๐ŸŒ

Loafjet is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Loafjet'

How To Use ๐Ÿ“ ?

From any view controller, a Loaf can be presented by following this two steps:

1. Import Library ๐Ÿ—ณ

 import Loafjet

2. Call Loafjet ๐Ÿ“ž

Loaf.PlainLoaf(message: "Message goes here", position: .Bottom, animationDirection: .Bottom, loafjetView: View)

Result: ๐Ÿ’ฏ

Plain Default Loaf
Screenshot 2021-01-27 at 12 31 14 PM

Plain Loaf

* With Default Parameters ๐Ÿ“— 

 Loaf.PlainLoaf(message: String, position: loafPosition, animationDirection: loafAnimation, loafjetView: UIView)

* Without Default Parameters ๐Ÿ“˜

Loaf.PlainLoaf(message: String, position:LoafPosition, loafWidth:CGFloat , loafHeight:CGFloat, cornerRadius: CGFloat, fontStyle: String, fontSize: CGFloat, bgColor: UIColor, fontColor: UIColor, alphaValue:CGFloat, loafImage: String? , animationDirection: LoafAnimation , duration: TimeInterval, loafjetView: UIView)

Gradient Loaf

* With Default Parameters ๐Ÿ“—

Loaf.GradientLoaf(message: String, position: LoafPosition, bgColor1: UIColor, bgColor2: UIColor, fontColor: UIColor, loafImage: String?, animationDirection: loafAnimation, loafjetView: UIView)

* Without Default Parameters ๐Ÿ“˜

Loaf.GradientLoaf(message: String, position:LoafPosition, loafWidth:CGFloat, loafHeight:CGFloat, cornerRadius: CGFloat, fontStyle: String, fontSize: CGFloat, bgColor1: UIColor, bgColor2: UIColor, fontColor: UIColor, loafImage: String?, animationDirection: LoafAnimation, duration: TimeInterval, loafjetView: UIView)
* With Default Parameters ๐Ÿ“—

Loaf.PopupCard(message: String, position: LoafPosition, bgColor1: UIColor, bgColor2: UIColor, fontColor: UIColor, loafImage: String?, blurEffect: UIBlurEffectStyle?, loafjetView: UIView)

* Without Default Parameters ๐Ÿ“˜

Loaf.PopupCard(message: String, position:LoafPosition, loafWidth:CGFloat, loafHeight:CGFloat, cornerRadius: CGFloat, fontStyle: String, fontSize: CGFloat, bgColor1: UIColor, bgColor2: UIColor, fontColor: UIColor, loafImage: String?, duration: TimeInterval, blurEffect: UIBlurEffectStyle?, loafjetView: UIView)

Dash Board

* With Default Parameters ๐Ÿ“—

Loaf.dashBoard(dashImage: String, dashTitle: String, dashContent: String, dashButtonTitle: String, mainView: UIView, completion: () -> ())

* Without Default Parameters ๐Ÿ“˜

Loaf.dashBoard(dashSpacing: CGFloat, dashRadius: CGFloat, dashColor: UIColor, dashImage: String, dashImageRadius: CGFloat, dashTitle: String, dashTitleColor: UIColor, dashContent: String, dashContentColor: UIColor, dashButtonTitle: String, dashButtonTitleColor: UIColor, dashButtonColor: UIColor, dashButtonRadius: CGFloat, dashButtonBorderColor: UIColor, dashButtonBorderWidth: CGFloat, dashDuration: TimeInterval, mainView: UIView, completion: () -> ())

Dash Board Dismissal ๐Ÿ“•

Loaf.dismissDashBoard(dashBoardView: UIView)

LoafWheel

* With Default Parameters ๐Ÿ“—

 Loaf.LoafWheel(message: String, bgColor1: UIColor, bgColor2: UIColor, loafWheelView: UIView)

* Without Default Parameters ๐Ÿ“˜

Loaf.LoafWheel(message: String, loafWidth:CGFloat, loafHeight:CGFloat, cornerRadius:CGFloat, bgColor1:UIColor, bgColor2:UIColor, fontStyle: String, fontSize: CGFloat, fontColor: UIColor, duration: TimeInterval, wheelStyle: UIActivityIndicatorViewStyle, blurEffect: UIBlurEffectStyle ,loafWheelView: UIView)

LoafWheel Dismissal ๐Ÿ“•

Loaf.dismissWheel(loafWheelView:UIView)

STUDIO ๐Ÿ’ป

Examples Studio Studio Studio

Don't want to use CocoaPodsโ—๏ธ

I have a solution ๐Ÿ‘€

Parameters ๐ŸŽš

Parameter Definition
message Message to show on Loaf
position Position of Loaf
loafWidth Loaf Width
loafHeight Loaf Height
cornerRadius CornerRadius of Loaf
fontStyle Font Style of Message
fontSize Font size of Message
bgColor Background Color of Loaf
Parameter Definition
alphaValue Opacity value for Loaf's background
loafImage Image on Loaf
duration Loaf Duration
completion Closure to add actions to be performed
animationDirection Loaf Animation type
blurEffect Blur effect type
wheelStyle Wheel Style
loafWheelView View on which LoafWheel is running
loafjetView View on which Loaf is presented

Combination of Position and Animations ๐Ÿ“™

Position Animation
Top Top
Centre Left & Right
Bottom Bottom

Snapshots ๐Ÿ“ธ

Plain(Top) Plain(Bottom) Plain(Centre) Plain(Centre)
Screenshot 2021-01-27 at 1 57 03 AM Screenshot 2021-01-27 at 1 58 44 AM Screenshot 2021-01-27 at 1 57 43 AM Screenshot 2021-01-27 at 1 58 23 AM
Gradient(Top) Gradient(Bottom) Gradient(Centre) Gradient(Centre)
Screenshot 2021-01-27 at 2 01 02 AM Screenshot 2021-01-27 at 2 00 11 AM Screenshot 2021-01-27 at 2 00 25 AM Screenshot 2021-01-27 at 2 00 46 AM

Customisation ๐Ÿ› 

Snapshots ๐Ÿ“ท

Do Not Disturb Information Warning
Screenshot 2021-01-27 at 2 04 10 AM Screenshot 2021-01-27 at 2 19 10 AM Screenshot 2021-01-27 at 2 04 32 AM
Success Error Device Detection
Screenshot 2021-01-27 at 2 04 43 AM Screenshot 2021-01-27 at 2 05 00 AM Screenshot 2021-01-27 at 2 05 14 AM

Loafjet +

Additional features

Popup Card Loaf Wheel

Dash Board

Loafjet Proprietary Alert Style Successful Style
Screenshot 2021-01-27 at 2 04 10 AM Screenshot 2021-01-27 at 2 04 10 AM Screenshot 2021-01-27 at 2 04 10 AM

Dark \ Light Mode Support ๐Ÿ”ฆ

Dark Mode Light Mode
Screenshot 2021-01-27 at 2 04 10 AM Screenshot 2021-01-27 at 2 04 10 AM

Portrait + Landscape Support ๐Ÿ”„

Loafjet Portrait Landscape
Plain Loaf โœ… โœ…
Gradient Loaf โœ… โœ…
Popup Card โœ… โœ…
Dash Board โœ… โŒ
Loaf Wheel โœ… โœ…

Video Demo ๐ŸŽฅ

Top(Top) Bottom(Bottom)
Centre(Right) Centre(Left)

Instructions โš ๏ธ

// iOS versions will varry 
if #available(iOS 10.0, *) {. 
 // write the code to run
 }
 else {
 print("Error Message")
}

Or

// iOS versions will varry 
 @available(iOS 10.0, *)

Note ๐Ÿ”ด

License โš–๏ธ

Loafjet is available under the MIT license. See the LICENSE file for more info.

How to Contribute ๐Ÿ–‹

Requirements โ•

Additional Info

Mentors ๐Ÿ“ฑ

GitHub Usernames Domain
@gokulNair Full Stack + Documentation
@anmolBansal Documentation

Project Admin ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป

Relative date Maintenance

Gokul Nair

Apps Using Loafjet๐Ÿ“ฑ

Dock! Remember Us LinkBoard

Community ๐Ÿ•

Like the Project ?

If you like using any of my projects or like what I'm doing, please do consider backing me with appreciating my work: Message me๐Ÿฅฐ

BMC logo+wordmark - Black

OR

Drop a star โญ if you find this project interesting!

Reward ๐ŸŽ

If you โค๏ธ the project then there is a gift for you:

Made with โค๏ธ in ๐Ÿ‡ฎ๐Ÿ‡ณ By Gokul Nair

ยฉ Gokul Nair