TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Aung Thar.
MQTimeOut detects when an app goes idle/inactive (no touches) and sends a time out notification.
Use Cocoapods or copy over these two files to your project
MQTimeOut.m
MQTimeOut.h
Adding MQTimeOut is simple.
Change your main.m file to:
@autoreleasepool {
return UIApplicationMain(argc, argv, @"MQTimeOut", NSStringFromClass([MQAppDelegate class]));
}
Start the timer and observe the time out notification:
[((MQTimeOut *)[UIApplication sharedApplication]) startTimer];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(timerDidTimeOut)
name:MQTimerTimeOutNotification
object:nil];
Review the sample for more features of MQTimeOut.
Usage is provided under the MIT License. See LICENSE for the full details.
A mention would be nice, but is by no means required. At the very least, shoot us an email and let us know if you've gotten any good use out of this control, or if you have any ideas for improvements.