I want to develop functionality such that to set size , width , height & orientation of UIImage dynamically in iPhone so 开发者_StackOverflowplease tell me any link or any idea to develop this functionality.
You can use UIImageView
:
//get the Image
UIImage *img = [UIImage imageNamed:@"img.png"];
//create a UIImageView
UIImageView *imageView = [[[UIImageView alloc] initWithImage:img] autorelease];
imageView.frame = CGRectMake(x, y, width, height); //set these variables as you want
I don't think anyone really understands your question, however:
size: (replace the width/height values wth your own)
myImageView.frame = CGRectMake(myImageView.frame.origin.x, myImageView.frame.origin.y,width,height);
orientation
float angleInDegrees = 90; // change this value to what you want
float angleInRadians = angleInDegrees * (M_PI/180);
myImageView.transform = CGAffineTransformMakeRotation(angleInRadians);
精彩评论