Shift View Upword When KeyBord Appear in Iphone

add following Method in ViewDidLoad

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];

Add following method according to requirement

– (void)keyboardDidShow:(NSNotification *)notificatiion{

    [self.view setFrame:CGRectMake(0,-200,320,460)];


-(void)keyboardDidHide:(NSNotification *)notification


[self.view setFrame:CGRectMake(0,-20,320,460)];



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: