UIView
コンテンツを含むスクロールビューがあります。UIImageView
のサブとして を追加していUIScrollView
ます (したがって、コンテンツ コンテナーの上にある必要があります)。これは iPhone 3.2 以降では機能しますが、3.1.3 を実行している iPhone ではイメージがコンテナーの上に表示されません。私のコードは次のようなものです:
// add the content container
UIView *contentContainer = [[UIView alloc] init];
[scrollView addSubview:contentContainer];
// add content, etc
// this works in 3.2+
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[scrollView addSubview:imageView];
// tried adding this for 3.1, but still didn't work
[scrollView bringSubviewToFront:imageView];
[imageView setFrame:CGRectMake(point.x, point.y, image.size.width, image.size.height)];
私が見逃しているものは他にありますか?ありがとう!