这是我用来做我的
我用我的viewDidLoad
方法做了我的
//use your URL
NSData *picOne = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sumptin.com/images/sumptin.jpg"]];
NSData *picTwo = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sumptin.com/images/sumptin.jpg"]];
NSData *picThree = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sumptin.com/images/sumptin.jpg"]];
NSData *picFour = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sumptin.com/images/sumptin.jpg"]];
NSData *picFive = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sumptin.com/images/sumptin.jpg"]];
//then convert data to actual pictures
UIImage *onePic = [UIImage imageWithData:picOne];
UIImage *twoPic = [UIImage imageWithData:picTwo];
UIImage *threePic = [UIImage imageWithData:picThree];
UIImage *fourPic = [UIImage imageWithData:picFour];
UIImage *fivePic = [UIImage imageWithData:picFive];
//then SHABAM!
slideShow.animationImages = [NSArray arrayWithObjects:
onePic,
twoPic,
threePic,
fourPic,
fivePic,
nil];
slideShow.animationDuration = 60.00f;
slideShow.animationRepeatCount = 0;
[slideShow startAnimating];
希望这会有所帮助...看到这个问题是在一年前发布的:)