Posts filed under ‘Geeky stuff’
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.
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.
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.
- Copy/Selection stops working on UIWebView
- We need to create a sub-class of UIWebView while Apple says we should not sub-class it.
- A lot other UIWebView features stop working.
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
- Refresh the current view
- Go to next/previous screen
- Start editing
- and the list goes on
Today lets check out how we can detect a simple shake using the API
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.
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.
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.