Home > Tutorials Home > Ios > UIScrollview Example in iOS

UIScrollview Example in iOS

Published on October 17, 2019 8:32:17 PM

Button Example

We are an online tutoring company that has laid its foundation in utilizing Multiple Intelligence methodology to understand specific needs and learning styles of a student.This is the ButtonPressed example. In this example we will see how to load another view after pressing button. So let see how it will worked. Another Buttonpress reference you can find out from here ButtonView in iPhone.So that we patch a particular student to a tutor having a compatible teaching style. We have devised a smart online tutoring system to give you measurable results.Schools, cramped with students, fail to give your child the edge, the motivation and the right teacher guidance to help him find the true potential. We at make sure that your child gets the perfect learning environment to outperform.

Step 1 : Open the XCode and create a new Single View Based Application template. Give the application name "UIScrollView Example". Copy this Code to the ViewController.h

#import <UIKit/UIKit.h>

@interface AbhishekViewController : UIViewController <UITextFieldDelegate>

@property (retain, nonatomic) IBOutlet UIScrollView *scrollView;

@property (retain, nonatomic) IBOutlet UITextField *txtName;

@property (retain, nonatomic) IBOutlet UITextField *txtMob;


Step 2 : Copy the Following Code into your ViewController.m File.

#import "AbhishekViewController.h"

@implementation AbhishekViewController

@synthesize scrollView;

@synthesize txtName;

@synthesize txtMob;

- (BOOL)textFieldShouldReturn:(UITextField *)textField
    [txtName resignFirstResponder];
	[txtMob resignFirstResponder];
	return  YES;

- (void)viewDidLoad
    [scrollView setScrollEnabled:YES];
	self.scrollView.contentSize = CGSizeMake(320, 900);
	[super viewDidLoad];


UIScrollview Example in iOS - Video Tutorial