2010年12月17日 過去Blog

IBOutlet UIImageView *bgImage;

@property(nonatomic,retain) IBOutlet UIImageView *bgImage;

上記のようなbgImageがInterfaceで宣言され、Interface Builder上に、UIImageViewが配置されているとすると以下のように実装すれば、該当箇所に画像が挿入されます。

bgImage.image = [UIImage imageNamed:@”bg.png”];

もしくは、以下のようにします。

UIImage *image = [UIImage imageNamed:@”bg.png”];

 

[bgImage setImage:image];

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

PHP 配列の要素を指定し、キーを取り出す

2010年04月14日 過去Blog
配列の要素の値から、そのキーを取り出す場合。 <?php $array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red'); $key = array_search('green', $array); // $key = 2; $key = array_search('red', $array); // $key = …
「PHP 配列の要素を指定し、キーを取り出す」をはてなブックマークに追加

モーダルビューとは?

2011年01月13日 過去Blog
モーダルビューとは、一時的なビューのことで、animated : Yes にすると、下の方からニョロっと出てきます。 [self presentModalViewController:picker animated:YES];
「モーダルビューとは?」をはてなブックマークに追加

addressbook内のデータをtableViewに表示させる

2011年01月17日 過去Blog
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusab…
「addressbook内のデータをtableViewに表示させる」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy