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