-4

我试图在 viewDidLoad 方法中设置视图层次结构,但最后一行出现问题。

UIView *catView = [[UIView alloc] init];


UIImage *image = [UIImage imageNamed:@"lolcat.png"];
UIImageView *imageView = [[UIImageView alloc]initWithImage:image];
[self.view addSubview:imageView];
4

1 回答 1

1

看起来你想改变

[self.view addSubview:imageView];

[catView addSubview:imageView];

请参阅https://teamtreehouse.com/forum/programming-a-background-stuck-on-code-challenge

于 2013-09-27T19:49:58.247 回答