我正在尝试使用 CGRectMake 为 uiimageview 分配位置和大小,这是代码;
-(IBAction)done11 {
[self performSelector:@selector(multibuttonvoid) withObject:nil afterDelay:2.0];
}
-(void)multibuttonvoid {
UIImageView *multibtn = [UIImageView alloc];
multibtn.image = [UIImage imageNamed:@"multibuttonpic"];
multibtn = CGRectMake(159, 325, 438, 318);
[self.view addSubview:multibtn];
}
所以,正如你所看到的,如果我按下一个按钮,它应该添加一个带有图片的 uiimageview。但由于某种原因,我在 CGRectMake 行上收到此错误:Assigning uiimageview to incompatible type CGRect, I think a CGRect is a uiimage