当前位置: 动力学知识库 > 问答 > 编程问答 >

iOS - Is it possible to have different versions of UIView subclass in one XIB file? (Similar to UITableViewCell Prototypes)

问题描述:

I created a custom notification view (UIView Subclass) in a XIB file. However, I want to have multple types (i.e. one would have one UILabel, another would have 2 UILabels for Title and Subtitle, etc.)

I do this a lot in UITableViewCells using prototypes and cell identifiers, and was wondering if it is possible to do this in one XIB file, and just call the actual view I want to use for the appropriate notification type.

Here is a screenshot of the XIB file I have so you can see what I mean:

分享给朋友:
您可能感兴趣的文章:
随机阅读: