For an iPad app for our customer Smart Enterprise Solutions we wanted to display multiple messages to the user. These messages were mainly feedback from a business logic layer that communicated with a backend. The messages should be visible inside the app. Some messages needed to be confirmed by the user while others needed to disappear after a defined timespan.
This final status bar looks like this:
The code is available at https://github.com/lothrop/StatusBar.iOS.
The status bar view is called
StatusView. To use
StatusView, use auto-layouts to snap it to the left, right and bottom of your screen.
StatusView is backed by the ViewModel
MessageViewModel contains an
ObservableCollection<IMessageItem>. You can insert items at any point in the collection, remove items or move items within the collection.
For a usage example, take a look at the
A big thanks to Smart Enterprise Solutions for letting me publish the code.
Xamarin.iOS 6.4 brought async/await support to iOS devices. Apart from supporting the idiom with the Mono 3.0 compiler, Xamarin also invested into adding awaitable versions of all long-running calls in Apple’s iOS API. One of my favorites is
Action or lambda to animate asynchronously without blocking the UI thread.
The fun begins when you use this to chain animations. Here’s an example of doing a horizontal shake animation that could be used to indicate an invalid entry: