Я не вижу ни одной картинки. Почему?
UIImage *photoImg = [UIImage imageNamed:@"http://blog.leadcritic.com/wp-content/uploads/2011/02/favorite_animal_picture.jpg"]; UIImageView *imageView2 = [[UIImageView alloc] initWithImage:photoImg]; [self.view addSubview:imageView2];
Потому что, если вы используете код:
[UIImage imageNamed:@"mypicture.png"];
Изображение должно быть на iPhone, а не загружаться с URL.Из URL вам нужно использовать следующее:
NSString path = @"http://blog.leadcritic.com/wp-content/uploads/2011/02/favorite_animal_picture.jpg"; NSURL *url = [NSURL URLWithString:path]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *photoImg = [[UIImage alloc] initWithData:data cache:NO]; UIImageView *imageView2 = [[UIImageView alloc] initWithImage:photoImg];
Вы не установили кадр imageView2
imageView2
imageView2.frame = CGRectMake( 0, 0, 100, 100 ); // Or whatever.