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
UILabelをコードで生成(Tips付)

Main Storyboard (IB)に用意されている Label を使わずに …

no image
乱数のこと

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

no image
for文の便利な使い方

for文を使って繰り返し実行させる場合、基本的には数値を使ってループさせます。 …

no image
CheatSheet

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

no image
NSLog まとめ

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

eyechatch_xcode_tips-300x300
Xcode6 GameCenter 実装

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

eyechatch_xcode_tips-300x300
UIViewの背景画像をフィットさせたい

UIViewは(UIImageViewとは違い)背景画像のサイズをフィットする機 …

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

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

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

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

eyechatch_xcode_tips-300x300
SNS連携

Twitter・Facebookとの連携は #import <Social …