Background:
I need to display a popover from a imageview (rect not barbutton) which has a search field.The popover needs to be presented from a UIModalPresentationFormSheet.This is successfully achieved
Problem:
The problem I'm facing (in Landscape mode) is when the keyboard is shown the modal form sheet shifts up and with it my frame for the popover.Hence the popover remains in its original position (before the keyboard was shown) and the presented rect is shifted up.
The solution i applied is to represent(using presentPopoverFromRect)
the popover in -(void)didShowKeyBoard:(NSNotification*) notif
from the changed rect and do the same in -(void)didhideKeyBoard:(NSNotification*) notif
.This works fine but the transition is very fast and bouncy .
So, how can i achieve a smooth transition for this?
What I have tried
I tried :
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDuration:5.0f];
[_statePopover presentPopoverFromRect:stateHandler.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:NO];
[UIView commitAnimations];
but it didn't work.
Can someone please direct me to the correct way of doing this?
Any help is highly appreciated.