Hi there,
I've one application and two lib files. Application initialize a class object which need to pass to another class which is in the library. How can i do that? Here is what i did but it just crash
mainClass.h
@interface mainUIDelegate: NSObject<UIApplicationDelegate>
{
bla bla...
myCppClass myCppObject;
}
mainClass.mm
-(void)viewDidLoad{
myCppObject = new myCppClass();
}
-(void)initObject:(id)sender
{
prefTableViewController *prefs = [[prefTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
prefs.myCppObject = myCppObject;
}
library 1 (myCppClass.h) (with cpp class object)
class myCppClass{
int a;
}myCppClass;
library 2 (prefTableViewUI.h)
@interface prefTableViewController:UITableViewController{
myCppClass myCppObject;
}
@property (nonatomic, assign) myCppClass myCppObject;
Can someone please let me know how can i pass such object? I've just a month experience in object C.