iOS 8今日扩展的最大高度? [英] Maximum height of iOS 8 Today Extension?

查看:129
本文介绍了iOS 8今日扩展的最大高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用动态大小的表格进行今日扩展。我已经能够使用以下内容调整表格大小:

I am working on a Today Extension with a dynamically sized table. I have been able to get the table to resize for the content using:

    self.preferredContentSize = accountsTable.contentSize

然而,我发现它不会比一定尺寸(568像素)高,即使我可以告诉它table contentSize更大。

However, I have found that it will not get taller than a certain size (568 px) even though I can tell the table contentSize is larger.

我不清楚这是否是一个内置限制,或者是否有办法解决这个问题。似乎某些先前的扩展(Stocks小部件)能够变得更大。

I'm not clear if this is a built-in limit or if there is a way around this to make a larger view. It appears that some previous extensions (Stocks widget) is able to become larger.

其他人遇到相同的行为。任何人都知道是否可以立即使扩展显示更大或使用像Stock小部件一样的全部显示按钮?

Anyone else running into the same behavior. Anyone know if it's possible to make an extension appear larger either immediately or using a "Show All" button like the Stock widget?

推荐答案

我做了一些测试,你可以用这个公式计算今日延期的最大高度:

I made some tests and you can calculate the maximum height of your Today Extension with this formular:

for iPhone:

for iPhone:

float maxHeight = [[ UIScreen mainScreen ] bounds ].size.height - 126;

float maxHeight = [[ UIScreen mainScreen ] bounds ].size.height - 171;

这适用于屏幕尺寸......

This should work for alle Screen sizes...

这篇关于iOS 8今日扩展的最大高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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