0

my program always an error of threads. error that appears at compile time http://imgur.com/6rGkwKd

1. My .h

import

@interface PerfilViewController : UIViewController

    <UIImagePickerControllerDelegate,UINavigationControllerDelegate>

    @property (weak, nonatomic) IBOutlet UIImageView *fotoPerfil;
    @property (weak, nonatomic) IBOutlet UIButton *botaoSalvarFoto;
    @property (nonatomic) UIImagePickerController *pegarFoto;

    -(IBAction)salvarFoto:(UIButton *)sender;

@end

2. My .m

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

    _pegarFoto = [[UIImagePickerController alloc]init];
    _pegarFoto.delegate = self;
    _pegarFoto.sourceType =  UIImagePickerControllerSourceTypeCamera;

}

-(IBAction)salvarFoto:(UIButton *)sender {
    [self presentViewController:_pegarFoto animated:YES completion:nil];
}

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

    _fotoPerfil.image = img;
    [[picker parentViewController] dismissViewControllerAnimated:YES completion:nil];
}
  • It's great that you included your code... but you need to provide more information. What do you mean "your program always an error of threads"? Can you include the error message or stack trace, and try to figure out which line it's coming from? – dcsohl Jun 02 '14 at 19:24
  • posted a picture of the console – Eduardo Edson Jun 02 '14 at 19:52

0 Answers0