-(void) keyboarddidhide:(NSNotification*)notif
{
if(!keyboardvisible)
{
return;
}
NSDictionary *info=[notif userInfo];
NSValue* avalue=[info objectForKey:UIKeyboardBoundsUserInfoKey];
CGSize keyboardSize=[avalue CGRectValue].size;
//Tag: Image Size as before
CGRect viewFrame=self.view.frame;
**viewFramesize.height+=keyboardSize.height;**
//Here I am just streaching the scrollView......
scrollView1.frame=viewframe; //Streaching the scroll view
keyboardvisible=yes;
//Tag: Image size increases....
keyboardvisible=false;
}
I am using XCode 4.
In my App I have a view page.
View
- Scroll View
- Text View
- Image View
-barButton
It is After the Notification that my image is streaching to full screen some how…
Whenevr my scroll view streches my image view stretches to the full screen.
Is there any property or method to fix the scrollview size or reset?
Your image view will stretch because you are stretching the ScrollView, if you do not want your scroll view to stretch
set the content size of the scroll view to zero.
I would suggest you to read