3

I'm porting an Android application to iOS. 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 different methods of the built-in UIAlertView from this post but there was nothing alike. Is this even possible with Swift and what are the best frameworks for Snackbar imitation?

6
  • 1
    Similar 3rd party lib: github.com/zekunyan/TTGSnackbar Commented Mar 20, 2022 at 18:00
  • Does this answer your question? snackbar with custom Function call in Swift Commented Mar 20, 2022 at 18:04
  • 2
    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 ;) Commented Mar 21, 2022 at 2:02
  • You can display a notification instead of showing a snackbar. Commented Jul 24, 2023 at 17:12
  • @acmpo6ou Out of curiosity, what do you mean? A notification is "outside" of the app (handled by the OS, triggered by the app), whereas the snackbar is "inside" the app's UI. Commented Jul 27, 2023 at 20:06

1 Answer 1

6

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.
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.