1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

detecting a pictures dimensions

Discussion in 'iPhone/iPad Programming' started by chamele0n, Aug 7, 2011.

  1. macrumors newbie

    #1
    Hi all,
    i was just wondering how to automatically detect a picture's height and width.

    Code:
    [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