I am not entirely sure whether this is as clean as it can be, but this is
working for me. Might be a starting point, please give me feedback if this can
be improved..
In your Objective-C class, put in appropriate method:
NSString *path = [[NSBundle mainBundle]
pathForResource:@"javascript
On Jul 4, 2013, at 6:20 AM, Tibira Botto wrote:
> it is possible to access a javascript function in Objective-C?
From the example it looks like you mean “is it possible to call an Objective-C
function from JavaScript”.
Look at for how to do this. There are lots of
comments that explain it.
it is possible to access a javascript function in Objective-C?
didactic example:
- (NSString *) getName
{
return @ "Test"
}
in javascript
function writeReturn(text)
{
document.write (text)
}
onclick = writeReturn (getName () function that in Objective-C).
I'm using Webview and dev