UIImageView 画像の差し替え
2014/11/21
[UIImageView alloc] 後の画像を変換する時は下記コードを参照してください。
UIImageView *myImage = [[UIImageViewalloc] initWithImage:
[UIImage imageNamed:@”/Sample_A.png”]];
myImage.frame = CGRectMake(160, 284, 100, 100);
[self.view addSubview:myImage];
@”/Sample_A.png” から @”/Sample_B.png” に画像変換する場合
myImage.image = [UIImage imageNamed:@”/Sample_B.png”];
関連記事
-
-
ステータスバーを隠す方法
Deployment Info の Status Bar Style 下部にある …
-
-
UIImageViewにボタンを貼りたい場合
タイトル画面などを作りたい場合、UIImageViewを使用して背景などを作るこ …
-
-
SNS連携
Twitter・Facebookとの連携は #import <Social …
-
-
よく使うショートカット
Ctrl+6 : 表示中のクラスのメソッド一覧 さらにテキスト入力してインクリメ …
-
-
UIButton 同時押し制御
UIButton *myBtn = [UIButton alloc] init] …
-
-
UIViewの背景画像をフィットさせたい
UIViewは(UIImageViewとは違い)背景画像のサイズをフィットする機 …
-
-
UIView
タイトル画面の背景など、新たにビューを追加した場合 UIViewを生成し sel …
-
-
Xcode6 GameCenter 実装
Xcode6(iOS7以上)でのGameCenter実装 検索であまり見つからな …
-
-
UILabelをコードで生成(Tips付)
Main Storyboard (IB)に用意されている Label を使わずに …
-
-
SubViewの重ね順を変更する
SubViewの重ね順を最前面に移動する場合 bringSubviewToFro …
- PREV
- for文の便利な使い方
- NEXT
- Sublime Text 3
