【发布时间】:2012-01-13 07:12:14
【问题描述】:
我有以下代码:
UIImageView * imgView = [[UIImageView alloc] initWithImage:image];
NSLog(@"IMAGE SIZE WIDTH IS %f AND HEIGHT IS %f", imgView.frame.size.width, imgView.frame.size.height);
[imgView setUserInteractionEnabled:YES];
[imgView setContentMode:UIViewContentModeScaleAspectFit];
CGRect frame = imgView.frame;
frame.size.width = SCREEN_WIDTH_PORTRAIT;
[imgView setFrame: frame];
但是这个view的高度并没有相应的变化,是怎么回事?
【问题讨论】:
标签: iphone objective-c ios ipad uiimageview