I have an class DMGStatController which has a delegate of type DMGSecondaryStatViewController. I write
DMGStatController *controller = [[DMGStatController alloc] init];
controller.delegate = self;
It is this second line of code that is giving me the error “Implicit Conversion from Objective-C Pointer to int * is Disallowed With ARC”. I don’t know what the compiler is talking about… DMGStatController’s property delegate is of type DMGSecondaryStatViewController, not int *. Any help would be much appreciated.
Also, here is where I declare the delegate.
#import <UIKit/UIKit.h>
#import "DMGSecondaryStatViewController.h"
@interface DMGStatDescriptionViewController : UIViewController{
}
@property(nonatomic , retain) DMGSecondaryStatViewController *delegate;
@property(nonatomic , retain) NSString *finalStatChosen;
@end
Make sure to
#import "DMGStatController.h", and that the header includes a@class DMGSecondaryStatController. You likely have a warning about the fact that it doesn’t know whatDMGSecondaryStatControlleris and that it’s defaulting toint. Make sure that there are no warnings in your ObjC code. Most ObjC “warnings” are in fact errors.