【问题标题】:UIView in the navigationItem shifted after change orientation iPad [closed]在更改方向 iPad 后,导航项中的 UIView [关闭]
【发布时间】:2013-06-19 12:52:46
【问题描述】:

在我的 iPad 应用程序的 navigationItem(详细控制器)中有两个 UIView。 在将方向更改为纵向模式并返回横向模式后,两个 UIView 都会向右移动一些像素。

lbNavTitle.autoresizingMask = UIViewAutoresizingFlexibleRightMargin;
rbNavTitle.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; 

很遗憾,这段代码没有帮助。

【问题讨论】:

    标签: objective-c ipad screen-orientation uinavigationitem


    【解决方案1】:

    尝试以下:

    CGRect headerDoubleTitleFrame;
    self.navigationItem.titleView.frame = headerDoubleTitleFrame;
    

    应该避免在 navigationItem 中的 UIViews 移动

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-29
      • 1970-01-01
      • 2022-12-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多