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

  関連記事

eyechatch_xcode_tips-300x300
LaunchImage 関連の設定

▼アプリ起動時のスプラッシュ画面 通常はチラっと一瞬だけ表示されるスプラッシュ画 …

no image
画面ローテーション

画面ローテーションを制御する場合は下記を追加する – (BOOL)s …

no image
iPhone画面サイズ

3.5inch 320 x 480px (Retina 640 x 960px) …

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

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

eyechatch_xcode_tips-300x300
テキストの文字間を詰める

UILabelなどで文字間を詰める(カーニング)したい時がちょいちょいあると思い …

no image
アプリの名前をつける

iPhoneのホーム画面に表示される「アプリ名」の付け方 アプリ名の変更には上 …

no image
乱数のこと

乱数(ランダムな数)を取り出す際 rand や arc4random を使用しま …

eyechatch_xcode_tips-300x300
Xcode6 GameCenter 実装

Xcode6(iOS7以上)でのGameCenter実装 検索であまり見つからな …

no image
SubViewの重ね順を変更する

SubViewの重ね順を最前面に移動する場合 bringSubviewToFro …

eyechatch_xcode_tips-300x300
ボタンに画像(背景)を指定する

// ボタンのサイズを指定する UIButton *startBtn = [[U …