Method 1---
-(void) textfielddidbeginediting: (Uitextfield *) TextField {
if (iPhone5) {
Return
}
Else
{
[UIView Beginanimations:nil Context:null];
[UIView setanimationduration:0.3];
[UIView setanimationdelegate:self];
Sets the status of the animation at the beginning of the current screen
[UIView Setanimationbeginsfromcurrentstate:yes];
Self.view.frame = CGRectMake (self.view.frame.origin.x,
Self.view.frame.origin.y-70,
Self.view.frame.size.width,
Self.view.frame.size.height);
[UIView commitanimations];
}
}
Method 2---ScrollView
-(void) textviewdidbeginediting: (Uitextview *) TextView
{
if (iPhone5)
{
Change the current scroll position
[Self.myscroll setcontentoffset:cgpointmake (0,phonenumbertextfiled.frame.origin.y-190) Animated:YES];
}
Else
{
Change the current scroll position
[Self.myscroll setcontentoffset:cgpointmake (0,phonenumbertextfiled.frame.origin.y-100) Animated:YES];
}
}