self.view 不在可见坐标内
我正在检查某人的代码,试图确定为什么他们的故事板在方向翻转时失控。
模态转场正在从视图控制器转移到另一个视图控制器。 Segue 标识符正在被正确定义和调用:
self performSegueWithIdentifier:@"identifiername" sender:self];
如果方向是标准的.. self.view.frame.origin.x 和 y 是 0,0。如果你把它翻转到横向..你会得到-20, 1280?没有任何内容是使用 CGRects 以编程方式定义的,并且所有标准方向都返回 true,没有任何更改。
有人有什么想法吗???
I'm going through someone's code trying to determine why their storyboard goes out of control on orientation flips..
Modal segues are going from View Controller to another View Controller. The segue identifier is being defined and called correctly:
self performSegueWithIdentifier:@"identifiername" sender:self];
if the orientation is standard.. self.view.frame.origin.x and y are 0,0. If you flip it to landscape.. you get -20, 1280? Nothing is defined programmaticly using CGRects and all standard Orientations return true with no changes.
Does anyone have any ideas whatsoever???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会仔细检查该项目是否有任何对
setFrame:
的奇怪调用。而且,对于 self.view.transform = ,应用的变换(例如使用变换进行缩放)会影响帧。你也可以检查你的边界,我怀疑你的视图边界是正确的,但检查总没有坏处。您还可以轻松地记录一个
CGRect
,如下所示:Good Hunting。
I would look through the project for any odd calls to
setFrame:
obviously. But also, forself.view.transform =
, applied transforms (like zooming with a transform) affect frame. You can also check your bounds, I suspect the bounds of your view are correct, but checking never hurts.Also you can easily log a
CGRect
like this:Good hunting.