在横向模式下的小部件中出现问题 [英] Issue in Widgets in landscape mode

查看:82
本文介绍了在横向模式下的小部件中出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对小工具有这个恼人的问题,它在横向模式下修剪了我的视图内容。我已静态放置内容大小但不起作用。 Apple是否限制小部件在景观中具有特定高度?
Apple的界面指南说它不推荐但可行吗?

I have this irritating issue with widgets that it trims the content of my view in the landscape mode. I have put the content size statically but it doesn't work. Does Apple restrict the widget to have a specific height in landscape? Apple's interface guidelines says it's not recommended but is it doable?

编辑:

推荐答案

iOS上的今日小部件有一个高度限制。最大高度为(屏幕尺寸) - (通知中心UI高度)。通知中心绘制UI后剩下的内容留给小部件。这在风景上会比在肖像方面有所不同。

There is a height limit for today widgets on iOS. The max height is (screen size) - (notification center UI height). Whatever's left after the notification center draws its UI is left for widgets. That's going to be different in landscape than in portrait.

不幸的是,这个限制没有记录,也没有任何方法可以在运行时查找。如果你要求更大的尺寸,你会得到比你要求的更少的东西,但没有办法问这个限制是什么。 [如果Apple的任何人读到此内容,请参阅rdar:// 18408718,今天扩展程序未记录,很难发现大小限制]

Unfortunately this limit is not documented, nor is there any way to look it up at run time. If you request a larger size, you'll get something less than you requested, but there's no way to ask what the limit is. [And if anyone from Apple reads this, please see rdar://18408718, "Today extensions have undocumented, hard to discover size limits"]

在某些情况下,通知中心似乎强加了较低的高度限制。对我来说这看起来像个错误,但现在没办法解决它。

In some cases the notification center seems to impose a lower height limit. This looks like a bug to me but there's no way around it for now.

这篇关于在横向模式下的小部件中出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆