How to set the height of a Today Widget Extension?

后端 未结 6 1828
心在旅途
心在旅途 2020-12-12 18:13

How can i change the height of my App\'s Today Extension in the Notification Center?

I tried it with the Interface Builder and with Code, the Interface Builder Displ

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 18:45

    Today widget default UIEdgeInsets defaultMarginInsets (UIEdgeInsets) defaultMarginInsets = (top = 0, left = 44, bottom = 39, right = 0)

    You should add this method

    - (UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMarginInsets {
    UIEdgeInsets edgeInsets = UIEdgeInsetsMake(0, 44, 0, 0);
    return edgeInsets;}
    

提交回复
热议问题