【问题标题】:Remove UIView from ViewController从 ViewController 中移除 UIView
【发布时间】:2011-08-25 06:41:33
【问题描述】:

我有一个视图控制器,在这个视图控制器中我有另一个子视图。如何删除此子视图。谢谢

【问题讨论】:

    标签: iphone ios ios4 uiview


    【解决方案1】:

    if([子视图超视图])
    {
    [subview removeFromSuperview];
    }

    【讨论】:

      【解决方案2】:

      假设您的子视图名称是 tempView 然后使用它

      [tempView removeFromSuperview];
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-09-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-11
        • 2017-08-17
        • 1970-01-01
        相关资源
        最近更新 更多