vikzilla
vikzilla

Reputation: 4138

Today Widget indented / doesn't use all space

Building a Today Widget in iOS, and my view doesn't take up the full width of the screen:

enter image description here

See in the above screenshot that anything that goes beyond that point of the screen gets cut off.

I have set this up using the standard storyboard provided with the Today Widget extension:

enter image description here

This is confusing to me because I see plenty of other app's Today extensions use the full width of the screen.

Upvotes: 0

Views: 69

Answers (1)

Bhavin Bhadani
Bhavin Bhadani

Reputation: 22374

you need to implement widgetMarginInsetsForProposedMarginInsets: like this

   func widgetMarginInsetsForProposedMarginInsets(defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets {
      return UIEdgeInsetsZero
    }

check Apple Doc - Design the UI

Upvotes: 1

Related Questions