Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🚀 Loafjet is a lightweight custom framework used to add Loafs, Dash Board, Popup Card, and Loading indicator in your Swift project

License

NotificationsYou must be signed in to change notification settings

Loafjet/Loafjet

Repository files navigation

Loafjet 🚀

ForksStarsIssuesPRsLanguagesVersionBadgesPlatformRelative datecommitcontributorsBadgebadgesizeWatchers

About 📒

Loafjet is alight 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 DetectionSilentNormal
Screenshot 2021-01-27 at 2 04 10 AMScreenshot 2021-01-27 at 2 04 10 AMScreenshot 2021-01-27 at 2 04 10 AM

Installation 🌏

Loafjet is available throughCocoaPods. To installit, 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
  • This is the most basic Loafjet that you can make with least line of code 👆.
  • Below all Loafjet types are mentioned , have a look on it 😊.

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)

Popup Card

* 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:()->())
  • Available foriOS 14 and above
  • Dash BoardDemo Photo 🌁
  • CallingDasboard Dismissal is required when Dash Board is used❕.

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)
  • LoafwheelDemo Photo 🌁
  • CallingLoafWheel Dismissal is required when LoafWheel is used forDynamic Processing❕.

LoafWheel Dismissal 📕

Loaf.dismissWheel(loafWheelView:UIView)

STUDIO 💻

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

  • There app consists of a live Studio made for developers to customise their Loaf in live. The live preview allows to select the best customisation possible.
  • The app also have various prebuilt Loafjets, do check it out to get a better idea😃.
  • Now you can experiment in theStudio and design the best suitable loafjet for your projects.
ExamplesStudioStudioStudio

Don't want to use CocoaPods❗️

I have a solution 👀
  • Add theSource Folder into your project.
  • Now you are ready to use Loafjet 🚀.
  • Remaining steps are same 😁.
  • Do read the documentation till the end to get a reward 🎁 fromLoafjet organisation.

Parameters 🎚

ParameterDefinition
messageMessage to show on Loaf
positionPosition of Loaf
loafWidthLoaf Width
loafHeightLoaf Height
cornerRadiusCornerRadius of Loaf
fontStyleFont Style of Message
fontSizeFont size of Message
bgColorBackground Color of Loaf
ParameterDefinition
alphaValueOpacity value for Loaf's background
loafImageImage on Loaf
durationLoaf Duration
completionClosure to add actions to be performed
animationDirectionLoaf Animation type
blurEffectBlur effect type
wheelStyleWheel Style
loafWheelViewView on which LoafWheel is running
loafjetViewView on which Loaf is presented

Combination of Position and Animations 📙

  • Customise your Loaf according to the below given chart 🎛.
PositionAnimation
TopTop
CentreLeft & Right
BottomBottom
  • The above mentioned are the possible combination of position & animation which are possible.
  • The remaining combinations are something which are not correct with UX prospect, so we have ignored them😃

Snapshots 📸

Plain(Top)Plain(Bottom)Plain(Centre)Plain(Centre)
Screenshot 2021-01-27 at 1 57 03 AMScreenshot 2021-01-27 at 1 58 44 AMScreenshot 2021-01-27 at 1 57 43 AMScreenshot 2021-01-27 at 1 58 23 AM
Gradient(Top)Gradient(Bottom)Gradient(Centre)Gradient(Centre)
Screenshot 2021-01-27 at 2 01 02 AMScreenshot 2021-01-27 at 2 00 11 AMScreenshot 2021-01-27 at 2 00 25 AMScreenshot 2021-01-27 at 2 00 46 AM
  • Above shown are few possible ways, you can customise according to your need (Customisation shown below).

Customisation 🛠

  • Loafjet offers you a wide variety of customisation, select a style and apply your creativity on it.
  • This are some possible ways, "How Loafjet can be used ?".

Snapshots 📷

Do Not DisturbInformationWarning
Screenshot 2021-01-27 at 2 04 10 AMScreenshot 2021-01-27 at 2 19 10 AMScreenshot 2021-01-27 at 2 04 32 AM
SuccessErrorDevice Detection
Screenshot 2021-01-27 at 2 04 43 AMScreenshot 2021-01-27 at 2 05 00 AMScreenshot 2021-01-27 at 2 05 14 AM

Loafjet +

Additional features

  • Dash Board,Gradient Loafwheel &Popup card are the additional customisation which you get in Loafjet🥳.
Popup CardLoaf Wheel

Dash Board

  • These are some possible ways of customisation 💡
Loafjet ProprietaryAlert StyleSuccessful Style
Screenshot 2021-01-27 at 2 04 10 AMScreenshot 2021-01-27 at 2 04 10 AMScreenshot 2021-01-27 at 2 04 10 AM

Dark \ Light Mode Support 🔦

Dark ModeLight Mode
Screenshot 2021-01-27 at 2 04 10 AMScreenshot 2021-01-27 at 2 04 10 AM
  • Dash Board is available for iOS 14 and above.
  • The above shown are some possible ways, How you can customise?, do try making your own and post it in theissue section and get featured⚡️.
  • What are you waiting for, writepod Loafjet andpod install it .
  • Done?, Now enjoy using Loafjet🚀.

Portrait + Landscape Support 🔄

  • Loafjet is made with Landscape + Portrait support* 🔓.
  • Have a look on your favourite Loafjet supports 📇
LoafjetPortraitLandscape
Plain Loaf
Gradient Loaf
Popup Card
Dash Board
Loaf Wheel
  • Other than Dash board all the Loafjets support every type of orientation 🎚.
  • Dash Board Landscape support will be added soon, stay tuned 💻

Video Demo 🎥

Top(Top)Bottom(Bottom)
Centre(Right)Centre(Left)
  • These are some possiblePosition X Animation combination, Loafjet supports various othercombinations too.

Instructions⚠️

  • At a time you can only use one Loaf(Simultaneous use is allowed).
  • Customise Loaf Position and Anmation according to the above given table.
  • Use.greatestFiniteMagnitude in duration to get an infinte loader.
  • To dismiss the loader useLoaf.dismissWheel(LoafWheelView:UIView).
  • For certain colors and blur effect particular iOS version is required, So to solve it use the below code (By default Xcode will show you both the fix).
// iOS versions will varryif #available(iOS10.0,*){.  // write the code to run}else{print("Error Message")}

Or

// iOS versions will varry@available(iOS10.0,*)
  • Test Run of few Loafjets are given, have a look on it (Running all Loafjets at a time may lead toirregular functioning!).

Note 🔴

  • Currently 'Loafjet' dont support SF Symbols, if you need it just raise an issue and I will try to add it ⚓️.
  • The Loafimage you add must be present in theImages.xcassets file .
  • Loafimages which you add must be of A x A Size(Else images may get cutout!).
  • In the Test Run make sure you don't run all the Loafjets at a time, wait for one whole Loafjet to complete its task, then go for next.
  • All the Loafjets are created with default parameters too, so notice carefully which one you are using (Functions with and without default parameters are shown ⬆️).
  • You can use two or more different Loafjet type at a time, but you can't use two or more Loafjet of same type at a time.

License ⚖️

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

How to Contribute 🖋

  • Run the app - Steps are mentioned above.
  • If you face issues in any step open a new issue.
  • To fix issues: Fork this repository, make your changes and make a Pull Request.

Requirements ❕

  • Device running on iOS/iPadOS 12.0+ versions 📱.
  • Swift 5.1+ 💻

Additional Info

Mentors 📱

GitHub UsernamesDomain
@gokulNairFull Stack + Documentation
@anmolBansalDocumentation

Project Admin 👨🏻‍💻

Relative dateMaintenance

Gokul Nair

Apps Using Loafjet📱

Dock!Remember UsLinkBoard
  • If your App usesLOAFJET, then let us know to get your app featured on ourWebsite.

Community 🍕

  • Want to be a part of our Organisation 🚀, then:
  • Mail us atgokulnair.2001@gmail.com ✉️
  • Do mention the following things:
    1. Reason
    2. Motive
    3. Skills
    4. What you liked abou Loafjet❤️
  • We are eager to read you message⚡️!

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:

  • Gift from Loafjet Organisation
  • Set the following image as your iPhone's Lock Screen wallpaper and see the magic 🪄.
  • Thank Me later by giving a ⭐️ to Loafjet🚀 .

Made with ❤️ in 🇮🇳 By Gokul Nair

© Gokul Nair

About

🚀 Loafjet is a lightweight custom framework used to add Loafs, Dash Board, Popup Card, and Loading indicator in your Swift project

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp