我想开发功能,以便在iPhone中动态设置UIImage的大小,宽度,高度和方向,所以请告诉我任何链接或任何想法来开发此功能.
你可以使用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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18400 次 |
| 最近记录: |