-2

I'm currently working on porting an Android application to iOS. One crucial part of the user-interface is an Android Snackbar; a small box at the bottom of the screen alerting the user of something, while not being a full-fledged dialog. SnackBar image.

I tried using different methods of the built-in UIAlertView from this post: How to implement a pop-up dialog box in iOS? but there was nothing like what I'm inquiring.

I would like to know also if this is even possible with Swift, and if I will have to redesign around this problem. As well as if there are any Github repos or the like to provide a framework.

I have done some research, and have not found any posts that answer my problem. The post at How to implement a pop-up dialog box in iOS? is not really at all what I'm looking for, even though I do realize now that there are frameworks out there to work around this issue, and realize that this is indeed possible. My only question now is what are the best frameworks to use for Snackbar imitation.

My question has been answered.

Thanks!

Omega_Pixel
  • 114
  • 1
  • 11
  • Similar 3rd party lib: https://github.com/zekunyan/TTGSnackbar – RTXGamer Mar 20 '22 at 18:00
  • Does this answer your question? [snackbar with custom Function call in Swift](https://stackoverflow.com/questions/45012358/snackbar-with-custom-function-call-in-swift) – Hung Vu Mar 20 '22 at 18:04
  • It's because your question is too general and broad - which means someone probably has asked this before, and yeah, a lot have. You should ask only when there is no question on SOF that can answer you ;) – Hung Vu Mar 21 '22 at 02:02
  • 1
    Thanks for helping me improve my question @HungVu! – Omega_Pixel Mar 21 '22 at 04:14

1 Answers1

1

SnackBar (along with Toast, PopupDialog, etc.) is a concept baked into Android, and there's no equivalent on iOS.

You can:

  • create a custom component, and handle fly-in and fly-out animations, or,
  • use external libraries. My go-to is ahmedAlmasri's SnackBar.swift, which resembles a lot of that on Android.
Hung Vu
  • 138
  • 1
  • 8