Sie sind nicht angemeldet.

1

Mittwoch, 11. September 2013, 17:47

Switch to Gyroscope inside Xcode

Hello i'm tryng to switch to gyroscope inside my native iOs app.

i'm using this method








- (IBAction)gyroscopeBTN:(id)sender {



[_myWebView stringByEvaluatingJavaScriptFromString:@"switch(plugin[skin_gyro].enabled);"];

}


but nothing happens?


Is this the right javascript to activate the gyro?


Ty

2

Mittwoch, 11. September 2013, 20:51

Hi,

you can't send krpano action code directly to the Javascript!

See here how to get and use the krpano Javascript interface:
http://krpano.com/docu/js/#top

That means - first you would need to get the Javascript 'interface' object and then use the 'call' function from that object to send the krpano action code.

Best regards,
Klaus