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
乱数のこと

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

no image
BGM・SE 導入方法

音楽:導入方法 1… AVFoundationフレームワークを追加 2… hファ …

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

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

no image
for文の便利な使い方

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

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

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

eyechatch_xcode_tips-300x300
UIButton 同時押し制御

UIButton *myBtn = [UIButton alloc] init] …

no image
UILabelをコードで生成(Tips付)

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

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

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

no image
UIViewを透明にする

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

no image
CGAffineTransformIdentity

アフィン変換がされたビューを,初期状態(アフィン変換がされていない状態)に戻す …