Start a new topic

Orientation always Portrait Mode

Orientation always Portrait Mode


Hello,

we are using the wikitude phonegap plugin in our phonegap app.
The wikitude plugin is used in an universal iPhone and iPad app which supports all orientations (Portrait and Landscape).

The problem we face is when start the wikitude plugin it does not autorotate to current device orientation.
It seems to be fixed to portrait mode.

Is there any option we missed?

Thanks and best regards,
Alex

 

 

 

Hi,

you don't missed an option. Thats a problem of the native PhoneGap plugin and the way the ArchitectView is presented on the screen.

If you know how to code  ObjC, you can fix that yourself, otherwise I can provide you a new version of the PhoneGap  plugin later that week.

Best regards

Andreas

 

Hi Andreas,

thanks for your answer.
I know how to code ObjC - I tried a few things but with no luck.

Would be great if you can help me out on this.

regards, Alex
 


 

Hi Alex,

You need to create a new class in ObjC (UIViewController subclass) and impl. the autorotation methods. After that you need to use this subclass in the native wikitude phonegap plugin.

I can't promise to send you an update today, but within the next few days I can send you something.

 

Best regards

Andreas

Hi Andreas,

thanks, I have now implemented an UIViewController subclass called (WTWikitudePluginViewController).

In the "WTWikitudePlugin.m" file I replaced the line:

UIViewController *viewController = ;

with

WTWikitudePluginViewController *viewController = ;

 

Now the View rotates to current device orientation BUT the camera view does not rotate... (see attached pics).

 

regards, Alex
 

 

Hi,

what you need to do is to tell our sdk view that the orientation changed. you can do this by overriding 'willRotateToInterfaceOrientation:' in your view controller and then call the sdk view method: 'shouldAutorotateToInterfaceOrientation'. Therefore you need a reference to the sdk view in your view controller. 

 

Best regards

Andreas

Hi Andreas,

thanks, the architect-view now also rotates to current device orientation BUT now we have to new problems :

Problem 1:

In Portrait-Mode the ImageDrawable-Objects can easily be clicked (touched) to trigger their onClick-event.
In Landscape-Mode it is really hard to trigger the onClick event of the ImageDrawable-Objects, you have to move your camera very near to the Object to be able to trigger the onClick-Event - what could be the problem here?


Problem 2:

If the Wikitude-Plugin is started in the Landscape-Mode instead of the Portrait-Mode the architect-view only covers half of the screen (the camera image seems to be impacted). It is not possible to trigger any onClick -Event of the ImageDrawable-Objects.

 

Now we would really appreciate your help.

 

thanks and best regards, Alex
 

Hi,

can help me with the exact code for rotate camera in ios?

thanks.

Luca
Login or Signup to post a comment