What is the height of the new iOS 10 Today Widget/Extension?

后端 未结 3 2012
孤街浪徒
孤街浪徒 2020-12-24 13:58

I am building an iOS Today widget, and while testing for iOS 10 I noticed that all widgets are now being given the same height (previous versions allowed the dev to set the

3条回答
  •  抹茶落季
    2020-12-24 14:49

    Simply do the following:

    let height = extensionContext?.widgetMaximumSize(for: .compact).height
    

    you can use both: .compact and .expanded types.

提交回复
热议问题