hi every , i have 20 HTML files ok ?
i am going to shake the iphone , after shook , one of 20 html files shows up as random . i don't know random value on the objective C . can u help me ? here is my code :
#pragma mark -
- (void)accelerometer:(UIAccelerometer *)accelerometer
didAccelerate:(UIAcceleration *)acceleration {
{
if (acceleration.x > kAccelerationThreshold
|| acceleration.y > kAccelerationThreshold
|| acceleration.z > kAccelerationThreshold) {
// image hidden
shakeIcon.hidden = YES;
//Random HTML view But here show only one .
NSString *path = [[NSBundle mainBundle] pathForResource:@"webViewContent" ofType:@"html"];
NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath:path];
NSString *htmlString = [[NSString alloc] initWithData: [readHandle readDataToEndOfFile] encoding:NSUTF8StringEncoding];
[self.falView loadHTMLString:htmlString baseURL:nil];
[htmlString release];
}
}
}
for example my html file names are : Myweb 1 ,Myweb 2 , 3,4,5,6,7,8,9 ............