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
画面ローテーション

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

no image
CGAffineTransformIdentity

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

eyechatch_xcode_tips-300x300
transform中の座標取得

CGAffineTransformを使用して画像を変化させている最中の座標取得方 …

eyechatch_xcode_tips-300x300
SNS連携

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

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

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

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

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

eyechatch_xcode_tips-300x300
経過時間を算出する

まず比較する為の時刻を予めローカルに保存するために NSUserDefaults …

no image
iPhone画面サイズ

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

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

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

eyechatch_xcode_tips-300x300
Xcode6 GameCenter 実装

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