detecting a pictures dimensions

Discussion in 'iOS Programming' started by chamele0n, Aug 7, 2011.

  1. macrumors newbie

    Aug 7, 2011
    Hi all,
    i was just wondering how to automatically detect a picture's height and width.

    [scrollView setContentSize:CGSizeMake(image.size.width, image.size.height)];
    Obviously, what i have here doesn't work. Once i push a new View, the image could be any size, and i dont want to hardcode a large scrollView size if it's not needed.

    thanks very much in advance

Share This Page