Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在 iphone 上开发一个小部件。我想调整小部件的高度。我将其更改如下。但我没有找到刷新机制。它在重新打开 NC 面板后工作。
-(void) updateView { CGRect widgetRect = _view.frame; widgetRect.size.height = widgetHeight; _view.frame = widgetRect; }
你有什么主意吗?问候,幸福
- 这应该为你做。
[myView setNeedsDisplay]
请参阅此链接:强制 UIView 重绘的最可靠方法是什么?