简体   繁体   中英

Is this the correct way of refreshing the drawing in a different view?

  • Import the CustomView.h in the data controller header file
  • Create an IBoutlet to my CustomView from there
  • Connect that outlet instoryboard from the DataController to the CustomView
  • Use that to call the view's setNeedsDisplay method.

Every time I add an item to the core data context I would like it to notify the CustomView (which lives in another tab) to redraw itself.

I am using ios5 and storyboards.

是的,DataController应该在需要刷新时通知视图,因为数据已更改,因此您的实现是合理的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM