passing object from iphone app to library in object C

passing object from iphone app to library in object C

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


@interface mainUIDelegate: NSObject<UIApplicationDelegate> {  bla bla...  myCppClass myCppObject; }

-(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.

Loading Accessory callout view for mkannotationview


How to display a base64 image within a UIImageView?
Indeed more information is needed on what/where exactly crash. Setting property value of parent viewcontroller class from child viewcontroller?Not knowing how your class is defined, I'd say the property looks suspicious. Disable iphone home button in app, is it possible?You want to try to create a method first, say -[prefTableViewController setMyCppObject:] with the argument type being myCppClass*, and then implement the method as myCppObject = *argument.. refreshing mkannotation properties and refreshing the annotation (One sideway suggestion, though purely stylistic matter: Upper-casing the first letter of your Objective-C class name will guidance tell which is which). swipe to delete when already in edit mode
Embedding WebView in UIViewProblem sending Apple Push Notification using Java and REST


I resolved this, the problem was lying in sythensizing the object. I had forgot to synthesize the object..

80 out of 100 based on 40 user ratings 590 reviews