1

I'm new to iOS programming so sorry if this is simple.

I have an image that is 25020px wide and 238px high with 60 frames (https://i.stack.imgur.com/HIJOY.jpg), each frame is 417px wide and 238px high. I want to show the first frame then move to the next frame based on the touch location over the image.

I've been reading around and I think it's possible with UIImageView initiated with a frame CGRect but I'm not sure how to implement this.

Can someone guide me in the right direction please? Thanks.

  • what you want to do is `UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(xPosition, yPosition, width, and height)]; you want to change the x, y, width, and height of the CGRectMake method and that is how you initiate it. – user2277872 Mar 08 '14 at 20:42

1 Answers1

0

Take a look at this project: https://github.com/dhoerl/PhotoScrollerNetwork

(Credit to David Hoerl who is a member of this site also!)

The idea is to use CATiledLayer to tile the large image, and then use a scroll view to move between tiles. Your use case seems very simple (move from tile to tile).

Community
  • 1
  • 1
Léo Natan
  • 56,823
  • 9
  • 150
  • 195