Last Updated: February 25, 2016
·
757
· thinkclay

Notification when App enters Foreground

def viewWillAppear(animated)
  @foreground_observer = App.notification_center.observe UIApplicationWillEnterForegroundNotification do |notification|
   // call method here
  end
end

def viewWillDisappear(animated)
  App.notification_center.unobserve @foreground_observer
end