横向方向问题(iPhone)
再会!
我有一个我强行景观化的风景。但我面临的问题是导航栏按钮在其他地方,但我必须向后单击几步(英寸)才能让它起作用。例如
,如果按钮位于
0,0 帧,那么我必须单击 50,0 才能返回。我附上屏幕截图,如果有人可以帮助我。请帮忙
谢谢&问候
Good day!
I have a view which i forcefully landscape. but the problem which i am facing is that the navigation bar buttons are somewhere else but i have to click few steps (inches) back to let it act. e.g.
if button is at frame
0,0 then i have to click at 50,0 to go back. i am attaching screenshot, if some one could help me in this. Please help
Thanks & Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果不提供代码(或整个项目),任何人都不太可能告诉您到底出了什么问题。
...除非这只是一个框架/边界问题。确保它们设置为正确的值。框架是显示视图的区域,边界是视图接受交互的区域。
Without providing the code (or the entire project), it is unlikely for anyone to tell you exactly what is wrong.
...Unless this is just a frame/bounds issue. Make sure they are set to the proper values. The frame is the area where your view is displayed, and the bounds is the area where your view will accept interaction.
你是如何强制屏幕横向的?通常的方法如下(在任何 UIViewController 子类中):
如果您以任何其他方式强制它,这可能是导致问题的原因。
How did you force the screen in landscape? The usual way is something like the following (in any UIViewController subclass):
If you forced it any other way, that might be the cause of your issue.
这可能是由于没有自动调整大小而导致的,您只需转到Interface Builder中的布局,然后实时自动调整大小即可。
或者
通过一一选择所有组件,点击 cmd+3 然后有一个名为 autoresizing 的面板,仅选择内部方块中的行,并取消选择外部方块(如果有
),然后您就丢失了将显示块并且不会出现按钮问题
干杯
This may cause due to no Auto resizing You will only have to do is goto Layout in Interface Builder then Live Auto resizing.
OR
By selecting all the components one by one hit cmd+3 Then there is a panel named autoresizing only select lines in inner square and deselect outer one if any
Only then your missing block will be shown and no button problem will be there
Cheers