【问题标题】:Objective C - basis class of UIButton and UILabelObjective C - UIButton 和 UILabel 的基础类
【发布时间】:2013-05-21 14:27:26
【问题描述】:

我目前正在创建自己的表格模型。我的问题是我希望能够将 UILabel 和 UIButtons 放在字段中。为此,我必须将字段 * 设置为它们两者都惰性的东西。

我的问题:是否有 UILabel 和 UIButton 共享的基类?像 UIElement 这样的东西会很棒。

【问题讨论】:

  • 如果您阅读 UILabel 和 UIButton 类引用顶部的“继承自”行,您会很快找到它:-)
  • 感谢您的提示。将来我会在发布类似问题之前这样做。

标签: objective-c uibutton uilabel inheritance


【解决方案1】:

它们都继承自 UIView

【讨论】:

  • 我不知道。谢谢!
【解决方案2】:

UILabel 和 UIButton 的第一个公共子类是 UIView。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-11-13
    • 2011-09-13
    • 2023-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多