开发者

Image Swiping In Objective-C

I'm just a beginner to iphone development.

Recently i'm doing a project in which images need to be swiped. Could any one help me with it?

The images are stored in a server whose link is开发者_开发技巧 given. I'm need it badly. So please help me

thank you


There are two ways.

  • You could either look at using a Paging Scroll View
  • Or, You could look at getting a series of UIImageViews with the correct images in each and then setting up a UISwipeGestureRecogniser for both directions. On the swipe's event handler you can adjust the x and y positions of the imageViews.

This is basic stuff. You should read some of the How-to's on Apple's developer website to help you with the base knowledge.

Edit:

Regarding the Internet images, the code can be adapted into the paging scroll view example:

NSString *path = @"http://merrimusings.mu.nu/archives/images/groundhog2.jpg";
NSURL *url = [NSURL URLWithString:path];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data cache:NO];

Load the strings from an NSMutableArray instead and you're good to go!


Use Three20 photo Album. Your problem will be solved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜