// Do any additional setup after loading the view from its nib. NSLog(@"image vei"); UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0,45.0,300,300)]; imageView.image = [UIImage imageNamed:@"testimg.png"];//加载入图片 [self.view addSubview:imageView]; [imageView release]; @property (retain, nonatomic) IBOutlet UIImageView *oneimgview; @property (retain, nonatomic) IBOutlet UIImageView *twoimgview; oneimgview.image = [UIImage imageNamed:@"testimg.png"]; twoimgview.image = [UIImage imageNamed:@"two.png"]; [oneimgview release]; [twoimgview release];