I am developing a Today widget with dynamic height. As a result of a tapGesture
I am increasing the widget height using the method:
- (void)updateWidgetHeightWithSize:(TCWidgetSize)size {
self.widgetSize = size;
CGFloat height = 100;
if (self.widgetSize == TCWidgetSizeLarge) {
height = 200;
}
CGRect viewFrame = self.view.frame;
viewFrame.size.height = height;
self.view.frame = viewFrame;
[self setPreferredContentSize:CGSizeMake(self.view.frame.size.width, height)];
}
But after setting the height back to 100, UIButton
and TapGesture
on the widget are not responding. If I close the NotificationCenter
and open it again everything works properly. Please help..