im working on an App that has one Todays Extension functionality, But when i open Todays Extension my App's Extension shows with gap at left side on iPhone , it seems like Extension View shifted 50-60 pixel right side. so how can i remove this gap.
Asked
Active
Viewed 670 times
1
-
possible duplicate of [Fit width in iOS 8 Today Extensions](http://stackoverflow.com/questions/25993986/fit-width-in-ios-8-today-extensions) – jlw Sep 25 '14 at 19:09
2 Answers
8
Finally i find code to remove gap
Objective-C
-(UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMarginInsets{
return UIEdgeInsetsZero;
}
Swift
func widgetMarginInsetsForProposedMarginInsets(defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets{
return UIEdgeInsetsZero
}

Kuldeep
- 4,466
- 8
- 32
- 59

Jayesh Lathiya
- 788
- 6
- 18
1
i had tried this and it works for me
-(UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMarginInsets{
return UIEdgeInsetsZero;
}

Patel Jigar
- 2,141
- 1
- 23
- 30