UIImageViewでアニメーション(画像を入れ替える)

全体の流れ
1.NSArrayにいくつかの画像をセット
2.UIImageViewにそのArrayをセット
3.各種設定(タイミングとか)をセット
4.アニメーションスタート

UIImage *image1 = [UIImage imageNamed:@”hoge1.png”];
UIImage *image2 = [UIImage imageNamed:@”hoge2.png”];

UIImage *image3 = [UIImage imageNamed:@”hoge3.png”];

NSArray *images = [NSArray arrayWithObjects:image1, image2, image3, image4, nil];

self.imageView.animationImages = images;
// 3秒ごとに画像を変える
self.imageView.animationDuration = 3.0f;
// 3回繰り返し。0で無限
self.imageView.animationRepeatCount = 3;
 // アニメーションを開始

[self.imageView startAnimating];

// アニメーションを終了
// [self.imageView stopAnimating];

残念ながら画像が切り替わる時のエフェクトはつけられない。パッ、パッて変わる。

UITableViewで最下行以降は線を出さない

全体の流れ
1.UITableViewのフッターを設定するとそれ以降の行は表示されない。

【フッターに文字列を入れる場合】
-(NSString*)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section{
return @”これがフッターに出ます”;
}

【フッターの背景色を変える場合】
-(void)tableView:(UITableView *)tableView willDisplayFooterView:(UIView *)view forSection:(NSInteger)section{
[view setTintColor:[UIColor colorWithRed:1.f green:0.611f blue:0.905f alpha:1]];
}