2011-05-26 36 views
2

一個UIImageView我有更大里面一個UIImageView一個UIView。有沒有辦法隱藏超出視圖大小的東西?的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]; 

非常感謝!

回答