Presented is a quick snippet of how to set the text alignment for the message field of a UIAlertControlller. It basically requires creating a NSMutableAttributedString with a NSMutableParagraphStyle that sets the text alignment. The message is then set in the controller by accessing the NSMutableAttributedString object’s string using the “attributedMessage” key.
Here is an example:
Continue reading “Set Text Justification in a UIAlertController”
I have been busy working on a prototype tank game that uses iOS MPC for multiplayer functionality. I started with some code on Github to get a head start on the tank movements and collision detection. MPC is pretty easy to use with the only problem I encountered were stale peers showing up in the peer browser. This was solved by storing the MCPeerID for reuse as well as making sure the MPC assistant stopped advertising when the application went into the background or the peer became disconnected. This is what the application looks like with two players (max of four):
Continue reading “Multiplayer Tank Game”
Took some time today updating our projects page. This page contains a number of learning applications that are public so you can see what we did to create these apps. We just added two new applications: Camping Directory and Windup Wars. These are my own first forays into iOS development using Swift. Thanks to Ray Wenderlich for the great game tutorial.
Here is a really simple example of how to create an about box from a UIAlertController in iOS using Swift. The box displays the application icon, the current version and some text about the application:
Continue reading “Simple About Box in Swift”
I just started exploring game development again to give myself a break from my daily work as a data architect. First I had to find tools that would run on a Mac and create games for Android as well as iOS.
Continue reading “Exploring libGDX for Game Development”
Here is a really simple script for using Geolocation with the new Google Maps API V3. The code is pretty self explanatory:
Continue reading “Google Maps Example Using Geolocation”
Here is an example of a very quick and dirty Android wrapper for a web application. The wrapper supports geolocation, file chooser, and an about box.
Continue reading “Android Website Wrapper Application”
I have been using Davi Alexandre’s yiinfinite-scroll extension to add Twitter like scrolling to my pet health record project.
I was using yiinfinite-scroll version 1.2 and yii 1.1.14. I followed the instructions and at first it seemed to work. I had a model with 12 rows and that happened to be my page size. Everything works, scrolling produces no paging.
Continue reading “Yiinfinite-scroll Paging Issues”
I have been working with Kinvey as the backend for Critters 2.0 for about a month. I was having problems setting a filter on a paged query and getting a total count of results with it.
Continue reading “Kinvey – Simple Aggregates and Paging”
Wow, the quality of SDKs have really gone downhill. I just spent two days trying to get past the poor documentation and non-compiling sample applications of the Facebook for Android SDK. I also had a similar experience with the Android SDK from Kinvey. The difference is Kinvey wants you to succeed and has awesome developer support whereas Facebook really doesn’t care what they release. Facebook has become way too big, too fast to be able to release any sort of quality work. I look forward to good things from Kinvey.
Just a rant… there, I feel better.