1
我想在我的UIScrollView中插入一个更多的图像。问题是:我所有的旧内容仍然是可滚动的,但是该图片在页面顶部保持静态。有人知道解决方案吗?uiscrollview不滚动uiimageview
代码:
- (void)viewDidLoad {
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f);
myImage = [[UIImageView alloc] initWithFrame:myImageRect];
UIImage * img = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"www.somelink.com"]]];
myImage.image = img;
myImage.opaque = YES; // explicitly opaque for performance
[scrollView addSubview:myImage];
[myImage release];
}
问候。