Maximum height of iOS 8 Today Extension?

user2816488 picture user2816488 · Jul 18, 2014 · Viewed 9.7k times · Source

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

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.

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.

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?

Answer

Urkman picture Urkman · Oct 14, 2014

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

for iPhone:

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

for iPad:

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

This should work for alle Screen sizes...