Skip to content

trm36/Autocorrect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Autocorrect

A simple scroll view with some funny images

###Step 1: Add a viewcontroller as the rootViewController of window

  • Create new viewController
  • Initialize and set as rootViewController

###Step 2: Add a paging scroll view to the ViewController

  • Add the following code to the viewDidLoad method:
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:scrollView];
    
    scrollView.contentSize = CGSizeMake(self.view.frame.size.width * count, self.view.frame.size.height);
    scrollView.pagingEnabled = YES;

Add images to the view like this:

        UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
        imageView.frame = CGRectMake(i * self.view.frame.size.width + 20, 20, self.view.frame.size.width - 40, self.view.frame.size.height - 40);

About

A simple scroll view with some funny images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published