Tabs

iPhone&Androidのアプリ制作・デザイン

*

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”];

 


 - Begin

  関連記事

no image
UIImageViewにボタンを貼りたい場合

タイトル画面などを作りたい場合、UIImageViewを使用して背景などを作るこ …

eyechatch_xcode_tips-300x300
UIButton 同時押し制御

UIButton *myBtn = [UIButton alloc] init] …

no image
ステータスバーを隠す方法

Deployment Info の Status Bar Style 下部にある …

no image
CheatSheet

Xcodeの便利なショートカットキー 良く使ってるなと感じたら追記 Cmd+Al …

no image
NSArray valueForkeypath関数

NSArrayやNSDictionaryを多用する人にお勧めですCoreData …

no image
UIView

タイトル画面の背景など、新たにビューを追加した場合 UIViewを生成し sel …

eyechatch_xcode_tips-300x300
よく使うショートカット

Ctrl+6 : 表示中のクラスのメソッド一覧 さらにテキスト入力してインクリメ …

no image
UIViewを透明にする

// opaque属性にNOを設定する事で、背景透過を許可する。 UIView …

eyechatch_xcode_tips-300x300
負の数を絶対数へ変換 abs

負の数を自然数(マイナスを含まない数字)にしたくて、「Xcode 自然数 変換」 …

no image
NSLog まとめ

デバッグする時などに、ログを出力する方法としてNSLogを使用します。 文字列を …