More awesome iOS controls coming our way as Xamarin developers! I’ve gone ahead and added another UI control to NuGet which is an incredibly useful little notification manager to add badges to any control or any frame in our view.
Check out the NuGet and GitHub project:
A Xamarin.iOS library for adding badges to any UIView, UIBarButtonItem, or position on the screen. You can also animate your badges!
Once installed, create an
var hub = new RKNotificationHub.RKNotificationHub(myView); // or... var hub = new RKNotificationHub.RKNotificationHub(myUIBarButtonItem); // or... var hub = new RKNotificationHub.RKNotificationHub();
You can then set or change the view or position of the circle:
You can also set the color:
Then you can change the value of the notifcation:
hub.Increment(); hub.IncrementBy(10); hub.Decrement(); hub.DecrementBy(10); hub.HideCount(); hub.ShowCount();
And of course you can play with styles and animations!
hub.Bump(); hub.Blink(); hub.Pop(); hub.MoveCircleByX(x,y); hub.ScaleCircleSizeBy(3);
If you like what you see, don’t forget to follow me on twitter @Suave_Pirate, check out my GitHub, and subscribe to my blog to learn more mobile developer tips and tricks!
Interested in sponsoring developer content? Message @Suave_Pirate on twitter for details.