hi guys,
is it possible to have loops inside initwithObject ?
i want to replace mockphoto with multiple values using loops.
any suggestion guys ?
thanks
is it possible to have loops inside initwithObject ?
Code:
self.photoSource = [[MockPhotoSource alloc]
initWithType:MockPhotoSourceNormal
title:@"Flickr Photos"
photos:[[NSArray alloc] initWithObjects:
[[[MockPhoto alloc]
initWithURL:@"url"
size:CGSizeMake(407, 500)] autorelease],
i want to replace mockphoto with multiple values using loops.
Code:
self.photoSource = [[MockPhotoSource alloc]
initWithType:MockPhotoSourceNormal
title:@"Flickr Photos"
photos:[[NSArray alloc] initWithObjects:
for (int y = 0; y < 20; y++) {
[[[MockPhoto alloc]
initWithURL:@"url"
size:CGSizeMake(407, 500)] autorelease],
}
any suggestion guys ?
thanks