UIImageView Relative Size

Discussion in 'iOS Programming' started by StarLion, Feb 3, 2011.

  1. macrumors newbie

    Jan 3, 2011
    I'm trying to be clever with an image. Which is always a cue for something to go wrong.

    Here's what i'm doing:
    	float movex = ((SIValue+3)/6.0 * _scale.image.size.width);
    		[UIView beginAnimations:nil context:NULL];
    	slider.transform = CGAffineTransformMakeTranslation(movex, 0);
           [UIView commitAnimations];
    Which works... sort of.
    _scale (an UIImageView) is holding an image that is 1024 px wide - and width returns that amount. But that isnt what i'm looking for. I'm looking for the width of the image -as its represented on the screen-. This is not a fixed number, as the image will scale depending on orientation of the ipad.

    Is there a way to retrieve this?

Share This Page