Reputation: 201
Does anyone know if its possible to have CSS exclusive to an iOS web app?
ie. If the standalone web app is open call this style (vs. the style sheet of the mobile website web in Safari). I'd assume it be done with JS but can't find documentation.
Upvotes: 0
Views: 1006
Reputation: 1
You can create Html file with css file.just include the content file in web view
NSString *fileString = [[NSBundle mainBundle] pathForResource: @"privacypolicy" ofType:@"html"];
myWebView = [[UIWebView alloc]init];
NSString *newHTMLString = [[NSString alloc] initWithContentsOfFile: fileString encoding: NSASCIIStringEncoding error: NULL];
NSURL *newURL = [[NSURL alloc] initFileURLWithPath: fileString];
Its work fine
Upvotes: 0
Reputation: 857
//Lines split for easy reading only
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)(navigator.userAgent.match(/iPad/i)))
{
//LINK TO YOUR STYLESHEET
}
Upvotes: 2