简体   繁体   中英

iOS Today Extension UITableView

My today extension (RSS Reader on picture) is not showing anything if table view is added (I have tried multiple prototype cells and also dynamically). I am using storyboards. I have been reading several articles and I watched video from WWDC 2014 and all mentioned, that today extension is "based" on view controllers but I guess I must be missing something.

There is nothing I could show you in code. Simply If I add a table view then extension is showing nothing.

在此处输入图片说明

You need to set the height of the widget by setting self.preferredContentsize to equal content size of the tableview. This has to be done in your controller.

self.preferredContentSize = self.tableView.contentSize;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM