Search code examples
iosautolayoutstoryboardtoday-extension

Why is my iOS widget so tall?


It looks fine in the Storyboard interface:

enter image description here

However, in the actual notification center, there's a bunch of space below my two views that ends up filling the height of the screen:

enter image description here

Why?


Solution

  • Your Today Extension doesn't know how tall it should be. Give something in your Storyboard a static height, like your info UIButton, and set its top and bottom pins.

    For example, infoButton Height Equals: 20, infoButton Bottom Space: Bottom Layout Guide Equals: 8, infoButton Top Space: Top Layout Guide Equals: 8.