2

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..

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
Anusha Kottiyal
  • 3,855
  • 3
  • 28
  • 45

0 Answers0