重新定义超类属性的类

时间:2016-09-16 12:56:08

标签: ios objective-c subclass superclass subclassing

以下是情况

我有控制器A和控制器BCA的子类。

接下来,我的课程RLMObjectNewsEventsRLMObject的子类。

A我有一个属性commonProperty。它呈现在BC类似超类的属性中。

问题:我需要告诉编译器,依赖于控制器,这是自定义类的属性。例如,在A id中,BNewsCEventsAB。因为在C中,我对此属性执行常见操作,例如获取数据并在此属性中设置它。在OrderNumber|ParentOrderNumber|ClientName 1|NULL|nameOfTheClient 2|1|NULL select a.OrderNumber, a.ParentOrderNumber, ISNULL(a.ClientName,b.ClientName) from yourTable a left join yourTable b on b.OrderNumber = a.ParentOrderNumber 中,我使用UI并需要此属性的具体类。

也许这不是明确的描述,最后一个例子(关于获取数据)是一种自定义的情况,但如果有人通过它,请分享您的经验。

0 个答案:

没有答案