Leak – open_handle_to_dylib_path

When checking for memory leaks using Instruments, I couldn’t figure out where an Malloc leak of 128 bytes was coming from. Turns out it’s a bug in the Simulator – when you test on your iDevice this leak disappears, so it can be safely ignored.

Hiding the status bar

Simple tip – it’s very easy to hide the iPhone / iPad status bar at the top of the screen. If you’ve started with one of Apple’s application templates, you’ll find this code in your [AppName]AppDelegate.m file:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// Override point for customization after app launch
[window addSubview:viewController.view];
[window makeKeyAndVisible];

return YES;
}

Simply add this line to this message:

[application setStatusBarHidden:YES withAnimation:YES];

… and you’re done.

(Note that the previous version of this message used animated:YES, but that’s been deprecated so will be removed in a future OS release).

Hi

I’m writing this blog to (hopefully) help others when developing for the iPhone and iPad. I’ll be including useful code fragments, explanations of how the APIs work, and anything else that’s left me screaming with frustration when trying to figure something out. Of course, often the solution has been incredibly simple, once you know how!