Xcode 開発で、iOSアプリ開発時、画像データを表示する設定になります。
アプリの状況に合わせて画像表示する際に使用できる定義です。
以下言語は、Objective-cになります。
6 | CGP = CGPointMake(154,390); |
8 | float heigthPer_1 = 0.9; |
9 | img = [UIImage imageNamed: @"U01.jpg" ]; |
11 | CGSize sz = CGSizeMake(img.size.width *widthPer_1, |
12 | img.size.height *heigthPer_1); |
13 | UIGraphicsBeginImageContext(sz); |
14 | [img drawInRect:CGRectMake(0,0,sz.width,sz.height)]; |
15 | img1a = UIGraphicsGetImageFromCurrentImageContext(); |
16 | UIGraphicsEndImageContext(); |
17 | UIImageView *iv = [[UIImageView alloc] initWithImage:img1a]; |
23 | CGP = CGPointMake(impX,impY); |
25 | [ self .view addSubview:iv]; |