= $u_time + 86400) { $modifiedDate = get_the_modified_time('F jS, Y'); echo 'Última modificación: '.$modifiedDate.''; } }?>

Constructor parametrizado en Objective-C

¿Cómo implementar un constructor parametrizado en Objective-C?

-(id) initWithTitle:(NSString *)title AndDescription:(NSString *)desc{
    self = [super init];
    if (self) {
        self.title = title;
        self.desc = desc;
    }
    return self;
}

¿Y la llamada?

[[Movies alloc]initWithTitle:@"Her" AndDescription:@"man and OS love"];

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *