Incorrect code sample
UIImagePickerController *pickerController = [[UIImagePickerController alloc]init];
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pickerController.delegate = self;
[self.navigationController.view addSubview:pickerController];
[pickerController release];
Actually there is nothing wrong with the addSubview method. The only problem is that it doesn’t load the gallery.