skip to Main Content

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?

2

Answers


  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.
    Login or Signup to reply.
  2. Google provides a proper Snackbar implementation for iOS: https://m2.material.io/components/snackbars/ios#using-snackbars

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search