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
Written by Clayton McIlrath
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#