Incorrect code sample
UIImagePickerController *pickerController = [[UIImagePickerController alloc]init];
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pickerController.delegate = self;
Actually there is nothing wrong with the addSubview method. The only problem is that it doesn’t load the gallery. In iOS 5 the gallery gets loaded without any issue. However if you want to make your app compatible with iOS 4 then you will have to either push the UIImagePickerController or present it as modal. If you don't like the transition animation you can always choose to push/present modal without the animation.
[self.navigationController presentModalViewController:pickerController animated:YES];
[self.navigationController pushViewController:pickerController animated:YES];