我有一个更大的UIImageView的UIView。有没有办法隐藏超出视图大小的东西?
CGRect baseFrame = CGRectMake(100, 100, 300, 80);
UIView *baseView = [[UIView alloc] initWithFrame:baseFrame];
[self.view addSubview:baseView];
[baseView release];
UIImageView *baseBg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 335)];
[baseBg setImage: [UIImage imageNamed:[NSString stringWithFormat:@"baseView.png"]]];
[baseView addSubview: baseBg];
[baseBg release];
非常感谢!