UIImageView 初始化

    UIImageView  *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,640)];
    [imageView setBackgroundColor:[UIColor redColor]];
    [imageView setImage:[UIImage imageNamed:@"0.jpg"]];
   // imageView.image = [UIImage imageNamed:@"0.jpg"];//加载入图片
    [self.view addSubview:imageView];
    [imageView release];

你可能感兴趣的:(imageview)