用nib创建view

  • (UINib *)nib {
    // return [[[UINib nibWithNibName:NSStringFromClass(self) bundle:nil] instantiateWithOwner:nil options:nil] lastObject];
    // return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:self options:nil] lastObject];
    return [UINib nibWithNibName:NSStringFromClass(self) bundle:nil];
    }

你可能感兴趣的:(用nib创建view)