EXC_BAD_ACCESS → ZombieObject 설정


EditSchme > 해당스킴 > Diagnostics > Memory Management

     Enable Zombie Objects



참고 : http://xinics.tistory.com/66


Posted by tenn
,






.h


<UINavigationControllerDelegate, UIImagePickerControllerDelegate>




////////////

.m




- (IBAction)tapBtn:(id)sender {

    UIImagePickerController *pickerLibrary = [[UIImagePickerController alloc] init];

    pickerLibrary.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

    [pickerLibrary setAllowsEditing:YES];

    pickerLibrary.delegate = self;

    

    //[self presentModalViewController:pickerLibrary animated:YES];

   //deprecated in iOS6

    [self presentViewController:pickerLibrary animated:YES completion:nil];

    

}


- (void) imagePickerController:(UIImagePickerController * )picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{

    

    targetImage = image; 

    

    [self dismissViewControllerAnimated:YES completion:nil];    

    

}




- (void) imagePickerControllerDidCancel:(UIImagePickerController *)picker{

    

    [self dismissViewControllerAnimated:YES completion:nil];   

    

    

}









Posted by tenn
,








    UITapGestureRecognizer *pressGesture =

    [[UITapGestureRecognizer alloc] initWithTarget:self

                                                  action:@selector(doSomethingMethod)];

    

    

    [targetView addGestureRecognizer:pressGesture];




Posted by tenn
,