ios - Enable zooming in a uiscrollview with paging enabled and scrolling enabled -


I have an illustrative view that I load with an array of images so that I can do pictures through pictures I'll be able to scroll the photo effect in iOS using this code:

  NSArray * paths = NSSearchPathForDirectoriesInDomains (NSC's directory, NSUserDomainMask, yes); NSString * path = [path objectwithoutx: 0]; NSString * imageFilePath = [Path StringBeafingPath Company: @ "NewPix"]; fileExists = [[NSFileManager default manager] fileExistsAtPath: imageFilePath]; If (fileexist) {IMG = [[NSMUTABELARROR] INIT]; [IMGand Object: [UIImage imageWithContentsOfFile: [Path StringbappingPackConPant: @ "NewPix / PC1Page"]]]; [IMGAD Object: [UIImage imageWithContentsOfFile: [Path StringbappingPackComment: @ "NewPix / PC2Page"]]]; [IMGAD Object: [UIImage imageWithContentsOfFile: [Path StringbappingPackConPant: @ "NewPix / Pixel Page 3"]]]; [IMGAD Object: [UIImage imageWithContentsOfFile: [Path StringbappingPackCommentator: @ "NewPix / Picture4"]]]; CGSize imageSize; ImageSize.height = 648; ImageSize.width = 927; self.scroll1.frame = CGRectMake (0,0, imageSize.width, imageSize.height); Self.scroll1.contentSize = CGSizeMake (imageSize.width * imgs.count, imageSize.height); self.scroll1.minimumZoomScale = 1.0; self.scroll1.maximumZoomScale = 3.0; Self.scroll1.pagingEnabled = Yes; Self.scroll1.delegate = self; CGFloat xPos = 0.0; For (UIImage * image in IMG) {imageView = [[UIImageView alloc] initWithImage: Image]; ImageView.frame = CGRectMake (XPOS, 0.0, Imagination Image, Images Highlights); [Self-scroll 1 adsview: image view]; XPos + = imageSize.width; }} - (UIView *) viewForZoomingInScrollView: (UIScrollView *) scrollView {int positionScrollPrim = scrollView.contentOffset.x; Int situcroll = conditional graph / 9 27; ImageView = [[UIImageView alloc] initWithImage: [IMGs object imported: staticcoll]]; // UIImage * tmep = [IMG's ObjectIntex: 1]; See return image; }   

I can not get the right result, instead I get a bunch of weird behavior like wrong zooming and when I try to zoom, I think my problem view Is in. The zooming inscrol view section, that's why I tried to solve it using the above code. But I can not work it, what am I missing?

The general approach is to use two scroll sequences: external one-scroll images and each image in the second scroll view Wrap is responsible for zooming.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -