Posts filed under ‘Geeky stuff’

MPMoviePlayerController – Then and Now

With iOS 3.2 a new class named MPMoviePlayerViewController was introduced. It completely changed the way movies were displayed all this while in the iPhone apps. MPMoviePlayerController was also changed considerably for good. This created one issue for the developers with existing apps using these classes and framework. Even if they decided to update, they still has to support users with iOS 3.1 and earlier. Here we create a Class MoviePlayer which detects users iOS version and creates appropriate object.


September 10, 2010 at 8:50 pm 1 comment

Building xcode project from command line : A tutorial

Recently, I had to integrate a xcode project into a build script such that the code compiles from command line and then installs into the required location. xcode doesn’t use Makefile to build the project. It has its own build system. However, it does have a way to build the project very easily from the command line.


November 10, 2009 at 10:37 pm Leave a comment

Detecting taps and events on UIWebView – The right way

Recently, I was working on a project which required detection of tap and events on the UIWebView. We wanted to find out the HTML element on which the user taps in the UIWebView and then depending on the element tapped some action was to be performed. After some Googling, I found out the most of the users lay a transparent UIView on top of the UIWebView, re-implement the touch methods of UIResponder class (Ex: -touchesBegan:withEvent:) and then pass the events to the UIWebView. This method is explained in detail here. There are multiple problems with the method.

  1. Copy/Selection stops working on UIWebView
  2. We need to create a sub-class of UIWebView while Apple says we should not sub-class it.
  3. A lot other UIWebView features stop working.


August 26, 2009 at 10:25 am 56 comments

Detecting a shake using iPhone SDK

Accelerometer has added an all new dimension to the iPhone. There is no limit on how we can use the accelerometer API in iPhone SDK. The following are some of the well known simple uses of shake/motion detection

  1. Refresh the current view
  2. Go to next/previous screen
  3. Start editing
  4. Shuffle
  5. and the list goes on

Today lets check out how we can detect a simple shake using the API


July 28, 2009 at 6:22 pm 3 comments

Using iPhone SDK MapKit Framework – A tutorial

Recently I was working on an application in which the map was required to be shown with in the application itself. I tried looking for some online resources that could be of some help but did not find any. I was not able to find any good tutorial that explains how can an address be shown on a map with the application. Therefore, I decided to write one and here it is. Hope it will be of some help.


June 22, 2009 at 8:15 pm 111 comments

The beauty of private implementation (Pimpls)

In C++, when anything in a header file changes, all code that includes that header either directly or indirectly needs to be recompiled. Therefore, sometimes even a very trivial change might need to compile a lot of code. Also, when we usually declare both the public and private interfaces in the same c++ header file. Basically, the class declaration lets you peek at its private parts, which should actually be of no concern to the user of the class. Pimpl basically, decouples the interface of a class from its implementation (Bridge Pattern?). Any compile time dependencies are also eliminated. Lets see how.


December 20, 2008 at 12:06 pm 1 comment

Tools to make a freelancer’s life easy

Every freelancer starts with an unorganized life and there are many who never get organized just because they don’t know how to. Communicating with clients is the most important part of a freelancer’s job. Not many of us like it just because most of the times we have to search through our mess (emails, documents etc) in order to keep our clients updated. Here are list of some tools that can make every freelancer’s life really easy and well organized.


November 21, 2008 at 2:23 pm 1 comment

Older Posts


  • RT @beeonaposy: Jumping back into code you wrote ages ago like 10% luck 20% skill 15% concentrated power of will 5% pleasure… 2 weeks ago
  • RT @jimmysong: Stuff CS departments should teach, but don't do very well: * Source control, esp. git * How to do effective code review * H… 1 month ago
  • RT @farbodsaraf: Advice to new managers: 1 earn trust by giving it 2 hire for EQ, train for IQ 3 eat lunch with your team 4 tell people t… 1 month ago