UIImageView * one = [[UIImageView alloc] initWithImage: [[UIImage alloc]] initWithContentsOfFile: [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @ "ball1.png"]]];Ajout d'une image dans UIPickerView
UIImageView *two = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball2.png"]]] ;
UIImageView *three = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball3.png"]]] ;
arrayBalls = [[NSArray alloc]initWithObjects:one,two,three,nil];
J'ai utilisé le code ci-dessus pour afficher l'image dans le UIPickerView. Mais l'application plante lors de l'exécution de ce code.
Quelqu'un s'il vous plaît aider.
j'ai eu l'erreur suivante s'il vous plaît aider *** en raison de l'application Mettre fin exception uncaught 'NSInvalidArgumentException', raison: '*** - [UIImageView isEqualToString:]: sélecteur non reconnu envoyé à l'instance 0x4a21df0' – isarathg