Determine if day change has occurred

I would like to create a notifciation that occurs every time a new day has occurred locally (either while using the app, or if it occurs in between launches). I was wondering what might be the best way to go about observing this change.

Answers


While your app is running, you can listen for the UIApplicationSignificantTimeChangeNotification notification and test the current day when you receive that. When your app quits, you can save the current day to your preferences, and when the app launches again, you can test the saved day against the current day.

You can get information about the current day using NSDateComponents.


Need Your Help

Windows Hooking and Dll Loading

c++ windows dll hook

I am looking into reworking an old CBT windows hook, and am slightly confused as to how it is currently working. The way it is setup is one dll handles the Windows hooking and its logic, while ano...

C++ Copy Objects from a file to a Array

c++ visual-c++

Hi need to copy the written objects in a file to copy to a array But following code gives me a Error

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.