How to dynamically adjust the height of the Today Extension

I have today's extension that displays both a tabular view and some text. I want to dynamically resize the widget to fit the height of the table.

enter image description here

I tried using autostart as well:

self.preferredContentSize = self.tableview.contentSize

      

But since my view is higher than the table height, it doesn't work.

I found a couple of examples showing how to do this in Objective C, but none in Swift.

Thanks for your help!

+3


source to share





All Articles