0

I am developing a widget on iphone. I want to resize height of widget. I changed it as follows. but I didnt find a refresh mechanism. It works after reopen NC panel.

-(void) updateView {
    CGRect widgetRect = _view.frame;
    widgetRect.size.height = widgetHeight;
    _view.frame = widgetRect;
}

Do you have any idea? Regards, Bliss

Andrew
  • 15,357
  • 6
  • 66
  • 101
Bliss
  • 1

1 Answers1

0

-- this should do it for you.

[myView setNeedsDisplay] 

See this link:What is the most robust way to force a UIView to redraw?

Community
  • 1
  • 1
Ben Coffman
  • 1,750
  • 1
  • 18
  • 26
  • I tried this before. Widget's height doesnt change. Notification Center controller doesnt take last _view and doesnt refresh widget's height. I need a trick to get last _views to all widgets or mine. – Bliss Apr 22 '13 at 11:05
  • What do you mean "last" views? Are all the views on the page or are you deallocting them? If you don't deallocate them they should be accessible at all times. – Ben Coffman Apr 22 '13 at 13:47