UIStackView is introduced in iOS 9 and is very useful for laying out dynamic collection of views in horizontal or vertical axis. Whenever one of it’s managed view’s hidden property changes, the layout is updated to show/hide the managed views. To checkout more about UIStackView see the Apple Class Reference. There is also a great tutorial about UIStackView at tuts+.
It would be very nice to have a control like UIStackView that is available for iOS7 and above. I needed a way to create a dynamic collection of views so I found an interesting port of UIStackView – OAStackView.
Check it out: https://github.com/oarrabi/OAStackView
PromiseKit (http://promisekit.org/) is an Objective C and Swift implementation of Promises/A+ specification (https://promisesaplus.com/). By definition, promise represents the eventual result or error of an asynchronous task. Interaction with the result or error is done using the then method with the block that result or error is passed to as a parameter.
Continue reading PromiseKit and Cancellation with Deferred
Mogenerator is a very useful command line tool used to generate NSManagedObject subclasses. For a given .xcdatamodel file Mogenerator will generate two classes for each entity. The first class, _MyEntity contains attributes and convenience methods of the entity and will be continuously overwritten to stay in sync with the data model. The second class MyEntity (subclasses _MyEntity) will never be overwritten and is a place to put custom implementation for that entity.
Continue reading iOS Mogenerator and MagicalRecord
Recently I stumbled upon an interesting open source framework called OpenALPR (Automated License Plate Recognition). This seemed very interesting for trying out on the Raspberry Pi. The OpenALPR framework has a couple of dependencies that you have to download and compile first.
Continue reading Raspberry Pi License Plate Recognition
Recently I have received the Raspberry Pi, Model B. I wanted to try out the OpenCV framework on the Pi. After installing OpenCV and all dependencies I tested something similar to iOS OpenCV Sample I wrote a while back. The project shows detection of a yellow circular shaped objects, face and smile detection. The code is written in Python. With Raspberry Pi I have used a low cost usb web camera I had lying around.
Continue reading Raspberry Pi OpenCV
Face tracking turret uses OpenCV framework for face recognition, the project is written in Python. The face center coordinate is sent via serial interface to Arduino. The coordinate is translated into horizontal and vertical angles that are used to position the servos on the pan/tilt mount.
Continue reading Face Tracking Turret
Thread safe design is achieved when operations on certain shared data structures can be safely executed from multiple threads at the same time. There are multiple ways to achieve thread safety using synchronisation tools provided by the iOS. They mostly consist of mutex locks (NSLock class or @synchronized directive) or the use of queues and GCD.
Continue reading Thread Safe Design
Circlemania is a visual perceptive game in which you have to find the last emerging circle among all other circles that have appeared previously. You are limited to 5 seconds for each turn. The faster you find the correct circle the more points you get.
Check it out at: https://itunes.apple.com/app/id466007126
Continue reading Circlemania – iPhone Game
In Catchup, an iPhone game I recently published on the app store, I am using device motion sensor in order to move the main character. In order to make the character movements smooth I’m using a low-pass filter.
Low-pass filter provides a smoother form of a signal, removing the short-term fluctuations, and leaving the longer-term trend.
Continue reading CMMotionManager and Low-pass filter
CatchUp is an iPhone game I created using cocos2d framework. The game concept is very simple. Tilting the device you’re moving the character and avoiding other game characters chasing you. The more time you succeed in avoiding the chasing characters, the better the score.
Check it out at: https://itunes.apple.com/app/id878533140
Continue reading CatchUp – iPhone Game