I have in my picker
class:
- (ID) initWithFrame: (CGRect) Sender with frame: Date with sender: (NSDate *) Date {if ((self = [super initWithFrame: frame])) {datePicker = [[UIDatePicker alloc] initWithFrame: CGRectMake (0, 0, 0, 0)]; DatePicker.date = date; [Change date of sender: selfetic picture]; DatePicker.date = date; }
and in the sender category:
- (zero) changeDate: (id) sender {// some code}
Both methods are also declared in .h files.
But when I compile, even if everything is working properly, xcode tells me:
No - change date: 'method found < / P>
The line
[sender changes date: self.datePicker] is referring to
What can I do to make it disappear? Thanks!
Because your sender type is id, and there is no method for type id (change date :) Therefore, if you want to call the changeDate:
method, you must enter your sender, or you must specify the specific class type.
(MySender *) MySender = (MySender *) Sender;
- (id) initWithFrame: (CGRect) Frame with Frame: (MySender *) Sender withDate :( NSDT *) Date {< / Code>
Comments
Post a Comment