search

Home  >  Q&A  >  body text

ios - UIViewController add和remove observer的时机

阿神阿神2768 days ago386

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 14:45:04

    First of all, VC1 and VC2 have nothing to do with each other. How did you monitor them? ?
    Isn't the removal of the listener always done when the listening page is dealloc?
    Secondly: I always do this kind of thing on notice. If the deletion is successful, a notification will be sent to notify the page that needs to be changed to request data again (that is, refresh).

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 14:45:04

    同意楼上,相隔太远只能发通知
    

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:45:04

    Just put it in dealloc

    reply
    0
  • Cancelreply