Hi all! i'd like to have a function in api style. But implementation must be on Objective-C lang. So i've read some information and decided to do following - to mix objective-C with C++. And have problem to call an objC method in C++ class. Thats my example:
//MYClass.h :
class CClass
{
private:
id fileName;
BOOL rez;
public:
bool download(char* initial_file_name)
{
fileName = [[NSString alloc] initWithUTF8String:initial_file_name];
// here I'd like to call my obj-c method
ObjCClass c = [[ObjCClass alloc] init]
rez = [c writeFile:fileName];
if (rez == YES)
return true;
return false;
}
};
@interface ObjCClass: NSObject
{
CClass *cClass;
}
- (BOOL) writeFile:(NSString *)fileName;
@end
something like this..