3

I'm developing an iOS today widget that displaying dynamic content using UITableView. In some cases the widget's content exceeds the height of Notification Center, but when using :

[self setPreferredContentSize:CGSizeMake(self.view.bounds.size.width, contentHeight)];

the OS limit the widget height to be exactly Notification Center visible UI height.

As per Apple documentation, it’s not a good experience when a widget’s height exceeds the height of Notification Center, but no limit is documented :

Avoid making users scroll or vertically shift the view to see all the information in your Today widget. A widget can expand vertically to show more information, but it’s not a good experience when a widget’s height exceeds the height of Notification Center, because it interferes with scrolling to see other Today widgets.

I have played a bit with Apple (built-in) Stocks app and added more than 20 stocks. When I open the Stock widget, first it was displaying several stocks with "See all" button. When I pressed the button I was able to see all stocks list, although the widget's content exceeds the height of Notification Center. (I was needed to scroll in order to see all list).

Does anyone have a clue how to get that experience ad describe above ?

Tsahi Deri
  • 571
  • 1
  • 3
  • 14
  • Dari , Is it possible now? – sateesh Sep 13 '15 at 18:29
  • As far as I know it's still not possible. I did manage to overcome this limitation with some workaround. In the first launch the widget calls 'setPreferredContentSize:' with height of 3000.0 in order the get max height in 'viewWillTransitionToSize:withTransitionCoordinator:' callback. Then store it in NSUserDefault (or somewhere else) for later use. – Tsahi Deri Sep 24 '15 at 12:14

1 Answers1

0

From my experience, this option is not currently available to third-party today extensions. The extension environment limits the height, and requesting more has no effect. What's worse is that the actual limit varies depending on screen size, and there's no way to discover the limit at run time except by trial and error.

Apple's apps, and now extensions, have often been exempt from rules that govern third party software. This appears to be another case where this is happening.

I filed a bug (rdar://18408718 in case anyone from Apple sees this) and I encourage you to do the same.

Tom Harrington
  • 69,312
  • 10
  • 146
  • 170