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.
(more…)

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.

(more…)

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.

(more…)

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

(more…)

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.

(more…)

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.

(more…)

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.

(more…)

November 21, 2008 at 2:23 pm 1 comment

Older Posts


TinyTweets

  • RT @jasonlk: If you're not willing or able to be constantly recruiting Don't be a CEO 2 days ago
  • @mrvijaysairam Thanks for applying! Our team is reviewing applications. We will reach out to you if you are shortlisted. 1 week ago
  • RT @thekaipullai: Ola's "your cab will be arriving in 5 minutes" is basically the same as the usual Indian "I will be there in 5 minutes" 3 weeks ago

Feeds