//AppDelegate.h
AppDelegate NSInteger myInt;
@property (readwrite, assign) NSInteger myInt;
//AppDelegate.m
@synthesize myInt;
//MyClass.h
AppDelegate *objAppDelegate;
//MyClass.m
objAppDelegate = (AppDelegate *) [[UIApplication sharedApplication] delegate];
When I try to assign a value to myInt like
objAppDelegate.myInt=(NSInteger *)0; // <--- this gives warning: something like incompatible pointer to integer conversion like that
So, how can I assign this variable?
objAppDelegate.myInt = (NSInteger)0;OR
objAppDelegate.myInt = 0;You should assign to an NSInteger without a pointer.