Git Product home page Git Product logo

toast-swift's Introduction

Hi there ๐Ÿ‘‹

toast-swift's People

Contributors

5kylar avatar allen870619 avatar bastiaanjansen avatar cederache avatar fromatom avatar honcon avatar jisu15-kim avatar lukszar avatar mmmcheese avatar nikoloutsos avatar nmtitov avatar swapnanildhol avatar tornikegomareli avatar twomedia avatar zandor300 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

toast-swift's Issues

Custom toast view

On your code page you have an example for CustomToastView, could you add some sample code of what would go into the func createView(for toast: Toast).

Need toast message position ?

/* Its not a issue its suggestion */
โ€“> it would be great if ya provide where to show toast like top, bottom, center .....
โ€“> toast need a dynamic height like what if your title and subtile have more then 3 lines ?

thank you... its suggestion not a complain ๐Ÿ™‚

Dark style

I don't see where I can apply the dark style toast, there is no parameters ?

Timer invalidation breaking pan gesture

With the current version the closeTimer?.invalidate() in the pan gesture handler is breaking the gesture with the following error: [SystemGestureGate] <0x143508050> Gesture: System gesture gate timed out.. The gesture handler is then not called anymore and the toast is then frozen and is not disappearing anymore.
Does someone else has a similar behavior?
It tested it on Xcode 14.0.1, 14.1 - iOS 16 Simulator and device with SwiftUI and UIKit in a plain project.

If I remove the invalidation everything works well, but I cannot figure out why this happens.

Add visionOS support

This lib could be useful for visionOS apps. Haven't done a lot yet with visionOS apps but since some people already made visionOS precompile conditional statements, someone else could join in on this discussion.

Currently visionOS isn't listed as a supported platform in SwiftPM Package.swift or Cocoapods podspec. (They were out of sync so I created PR #54 to fix that)

If the library works out of the box we could add visionOS platform support, but maybe other changes are needed to get it to work or to polish it.

Just wanted to start the discussion.

(I live in EU, no Apple Vision Pro for me ๐Ÿ˜ญ)

Add snapshot tests

I think it is worth adding some snapshot tests on the views.
That way we can be more confident merging PRs.
Also, we can add a Github action workflow for running the snapshot tests in every pull request.
IIRC github actions are free for open source project โค๏ธ

What do you think? @BastiaanJansen

Dismiss callback

Is there a way to know when the toast is dismissed? Something like a delegate or a callback?

Support animation type

Thinking of making a PR that will give the ability to choose the toast entering/exiting animation.

let config = ToastConfiguration(
    direction: .up,
    autoHide: true,
    enablePanToClose: true,
    displayTime: 5,
    animationTime: 0.2
+   animationType: .slide 
)

also fade animation type can be an option.

What do you think ๐Ÿค”

Number of lines option

It truncates the texts when they are too long. It would be good if we can set the number of lines in the config. Also, minimum scale factor can be useful too.

Especially needed when you don't use a subtitle but a long title.

Screenshot 2023-08-11 at 21 30 01

Attach to view

I got problems attaching the toast to the top of the tabBar
without attach argument it show in the top of the view controller, I want it to show to the bottom of it
when trying
utilsUi.showToast(title: "tet", message: "test", attachTo: self.tabBarController?.tabBar)
I got crash

Toast bottom direction broke swipe to remove

Great library. The problem is when enablePanToClose = true and direction = .bottom, when try to swipe from top to bottom - the whole app is trying to collapse (default for ios). Can you, please, add direction of swiping too?

Tap to dismiss

Hello - Thanks for this, really like it.

A little feature request. Please could you implement an option in the config for a 'tap to dismiss' option?

Cheers :)

I have a problem. A really, really, big problem.

After the first popover pops up, click the button to pop up the second popover and repeat to N pop-ups. It's going to add up, the shadow looks heavy, and what I need is the first one to close when the second one pops up, so how do I do that?

Custom font

Can I change font for Toast title?
No any information about this

Running resolver because the following dependencies were added: 'toast-swift'

Hello, I have a problem with compiling:

a resolved file is required when automatic dependency resolution is disabled and should be placed at /Volumes/workspace/repository/UOnLoad.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved. Running resolver because the following dependencies were added: 'toast-swift' (https://github.com/BastiaanJansen/toast-swift)2022-12-09 11:43:56.738 xcodebuild[4147:18228] Writing error result bundle to /var/folders/r0/yrl1s4f524n1lpryy_y16t2r0000gn/T/ResultBundle_2022-09-12_11-43-0056.xcresult

Image doesn't show up

Our app is a hybrid SwiftUI / UIKit app that forces Dark Mode at all times.

I've tried everything to get the image to appear, but it is always just a blank spot. Even the sample code doesn't work:

let toast = Toast.default(
image: UIImage(systemName: "airpodspro")!,
title: "Airpods Pro",
subtitle: "Connected"
)
toast.show()

The toast shows up as expected, but with a blank area instead of an image.

Custom styles

Is it possible to customize the font family, text & background colors, etc?

Thanks for the awesome library!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.