Game Development Community

Greystripe and accelerometer input

by Craig Fortune · in iTorque 2D · 12/07/2010 (4:28 pm) · 1 replies

Has anyone else integrated Greystripe recently? I'm having an issue where after I display a fullscreen ad, Torque ceases to receive any more accelerometer input - I can't figure out how/why this is happening.

Anyone else had this issue?

#1
12/07/2010 (10:19 pm)
Solution:

For some reason Greystripe was losing the reference to the accel delegate (or somehow it was becoming invalid), hence it was never able to reset it.

- (void)greystripeFullScreenDisplayWillClose
{
	// Called when an Ad Closes
	NSLog(@"Will close");
	
	// set app's settings
	[[UIAccelerometer sharedAccelerometer] setUpdateInterval:(33 / 1000.0f)];//this value is in seconds
	[[UIAccelerometer sharedAccelerometer] setDelegate:	[platState.Window.subviews objectAtIndex:0]]; // hack because I'm lazy ;)
}