iOS Mogenerator and MagicalRecord

mogenerator_magicalrecord_thumbMogenerator 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

Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

Raspberry Pi OpenCV

raspberrypi_python_opencv_smallRecently 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

Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

Thread Safe Design

threadsThread 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

Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

LPlaceholderTextView – UITextView subclass with placeholder

lplaceholdertextview_placeholder_cropLPlaceholderTextView is a UITextView subclass with placeholder text and placeholder text color properties. In order to use in your project just import the LPlaceholderTextView class and use it as in the code sample below.

LPlaceholderTextView is available on my GitHub repo:
https://github.com/lukagabric/LPlaceholderTextView

  • lplaceholdertextview_placeholder
  • lplaceholdertextview_text
Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone