IOS big image processing (with source code)
Big Image Processing
ViewController. m ---------------------------------------------- (void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // sliding UIScrollView * scrollView = [[UIScrollView alloc] init]; scrollView. frame = CGRectMake (0, 0, self. view. bounds. size. width, self. view. bounds. size. height); // sets the visible range of UIScrollView. backgroundColor = [UIColor grayColor]; // set the background color of UIScrollView to gray [self. view addSubview: scrollView]; // load UIScrollView UIImageView * imageView = [[UIImageView alloc] init]; imageView. image = [UIImage imageNamed: @ "xingkong.jpg"]; CGFloat imgW = imageView. image. size. width; // The Image width CGFloat imgH = imageView. image. size. height; // Image height imageView. frame = CGRectMake (0, 0, imgW, imgH); [scrollView addSubview: imageView]; // you can specify the scroll range (content size) of UIScrollView. contentSize = imageView. image. size ;}-
Demo