Friday, 22 August 2014

Single Class to Handle Multiple Xib’s - iPhone & iPad

-(NSString *)nibName
{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
        return [NSString  stringWithFormat:@"%@_iPhone", NSStringFromClass([self class])];
    else
        return NSStringFromClass([self class]);
}

No comments: