Home > Net >  What is the equivalent of a SnackBar in Swift/iOS
What is the equivalent of a SnackBar in Swift/iOS

Time:03-21

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.

Thanks!

CodePudding user response:

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.

CodePudding user response:

i believe a snack bar is the same on iOS here are some links :

https://www.build.vision/design/ios/snackbar?msclkid=878443cda87711eca95f243ece1592cd

https://www.bing.com/ck/a?!&&p=7b5c329ee4fca7b75e85e5d8cc2cae77caaefd9d9adf36091441655ac93faf36JmltdHM9MTY0Nzc5OTEzOSZpZ3VpZD01MTBiYTczNC04MjNmLTRiYTQtOTk2YS1iZjQ5ZjBkZGU2MTAmaW5zaWQ9NTE1NQ&ptn=3&fclid=6b09a3c1-a877-11ec-a1f1-c6503383e8b1&u=a1aHR0cHM6Ly93d3cuZGV2ZWxvcGVyLmNvbS9kZXNpZ24vcHJvZ3JhbW1pbmctYS1zbmFja2Jhci1pbnRvLXlvdXItaW9zLWFwcC8_bXNjbGtpZD02YjA5YTNjMWE4NzcxMWVjYTFmMWM2NTAzMzgzZThiMQ&ntb=1

  • Related