When I write Android apps, I love the Toast feature. Is there a way to get this kind of set and forget popup message in iPhone development using MonoTouch (C# .NET)?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- CALayer - backgroundColor flipped?
- Listening to outgoing sms not working android
You can use this link for objective-c code for Toast
http://code.google.com/p/toast-notifications-ios/source/browse/trunk/
While this link for its usage
http://code.google.com/p/toast-notifications-ios/wiki/HowToUse
which could be like any one of the below samples
I created a new repo on github with a class to do iOS toast-style alerts. I didn't like the one on code.google.com, it didn't rotate properly and wasn't pretty.
https://github.com/esilverberg/ios-toast
Enjoy folks.
Here's my version: http://github.com/scalessec/toast
I think it's simpler to use because it's implemented as a obj-c category, thereby adding the makeToast methods to any instance of UIView. eg:
Check this out:
https://github.com/ecstasy2/toast-notifications-ios
Edit: The project has moved to github so i update the link.
I really like MonoTouch solution proposed by Bahai.
The following is not a substitution. Is just a ready-to-go one method the worked for me.
If the method is called from a background thread (not the main UI thread) then BeginInvokeOnMainThread is required which means just call it like this.
MonoTouch Toast Version here. Inspired by Android.
To call it,
Enum File:
ToastSettings File:
Main Toast Class: