- Posts: 38
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
error when toggling between portrait and landscape mode
IP: 47.44.172.50
7 years 10 months ago - 7 years 10 months ago #13930
by pooja
Replied by pooja on topic error when toggling between portrait and landscape mode
Hi, Can you please tell where can I find this rotation method for iOS and Android cordova projects? Also, how should I save the textfield annot content.
Last edit: 7 years 10 months ago by pooja.
IP: 47.44.172.50
7 years 9 months ago #13937
by pooja
Replied by pooja on topic error when toggling between portrait and landscape mode
Hi, do you have any suggestion on this?
"Can you please tell where can I find this rotation method for iOS and Android cordova projects? Also, how should I save the textfield annot content."
"Can you please tell where can I find this rotation method for iOS and Android cordova projects? Also, how should I save the textfield annot content."
IP: 37.183.44.177
7 years 9 months ago #13940
by federico
Replied by federico on topic error when toggling between portrait and landscape mode
Hi,
I suggest you to save the textfield's text on rotation event, so you should edit - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in RDPDFViewController class like this:
I suggest you to save the textfield's text on rotation event, so you should edit - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in RDPDFViewController class like this:
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (![textFd.text isEqual: @""]) [m_view setEditBoxWithText:textFd.text];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeOrientation" object:nil];
return YES;
}
IP: 212.97.62.176
7 years 9 months ago #13942
by Davide
Replied by Davide on topic error when toggling between portrait and landscape mode
Hi,
for Android you should override the onConfigurationChanged method of PopupEditAct and here call updateAnnot() to save the new annot text.
You have to implement it in native iOS and Android in the demo project and compile for Cordova.
for Android you should override the onConfigurationChanged method of PopupEditAct and here call updateAnnot() to save the new annot text.
You have to implement it in native iOS and Android in the demo project and compile for Cordova.
IP: 47.44.172.50
7 years 9 months ago #13954
by pooja
Replied by pooja on topic error when toggling between portrait and landscape mode
Hi,
doing so keeps the text. But the field loses its focus after changing orientation. Can you please tell how can I keep the focus on element which i was editing before changing orientation?
doing so keeps the text. But the field loses its focus after changing orientation. Can you please tell how can I keep the focus on element which i was editing before changing orientation?
IP: 47.44.172.50
7 years 9 months ago #13956
by pooja
Replied by pooja on topic error when toggling between portrait and landscape mode
Hi, could you please suggest something on this?
"
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in RDPDFViewController class like this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (![textFd.text isEqual: @""]) [m_view setEditBoxWithText:textFd.text];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeOrientation" object:nil];
return YES;
}
doing so keeps the text. But the field loses its focus after changing orientation. Can you please tell how can I keep the focus on element which i was editing before changing orientation?
"
"
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in RDPDFViewController class like this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (![textFd.text isEqual: @""]) [m_view setEditBoxWithText:textFd.text];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeOrientation" object:nil];
return YES;
}
doing so keeps the text. But the field loses its focus after changing orientation. Can you please tell how can I keep the focus on element which i was editing before changing orientation?
"
Time to create page: 0.389 seconds