开发者

Image larger than screen (intended). How to implement touch features

I tried to google my problem but I don't really know how to word it in a brief enough way :/

Basically I have this image which is larger than th开发者_开发问答e screen. Its in the view and its View Mode is set to the Top Left. I know how to drag an image around the screen, but I basically want to drag the view around the image, if you get me? Could anyone direct me to some example code or briefly explain the steps involved in this?

Thanks,

Jack


You need to put a UIImageView inside of a UIScrollView and then set them up similar to this.

UIImage *image = [UIImage imageNamed:@"image.png"];
CGSize imageSize = image.size;
self.imageView.frame = CGRectMake(0.0, 0.0, imageSize.width, imageSize.height);
self.imageView.image = image;
self.scrollView.contentSize = imageSize;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜