I get a warning on the line (theTextField.delegate = self;) that says: "Assigning an" identifier from an incompatible type Alert Prompt "
- (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okayButtonTitle { if (self == [super initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:okayButtonTitle, nil]) { UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)]; [theTextField setBackgroundColor:[UIColor whiteColor]]; [self addSubview:theTextField]; self.textField = theTextField; [theTextField release]; CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, -25.0); [self setTransform:translate]; theTextField.backgroundColor = [UIColor clearColor]; theTextField.borderStyle = UITextBorderStyleRoundedRect; theTextField.delegate = self; } return self; }
user594161
source share