该字符串applicationWillEnterBackground
不会出现在UIKit
动态库中。我很确定系统永远不会发送该消息。
:; strings - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit | grep applicationWillEnterBackground
为了比较,库确实包含字符串applicationDidEnterBackground
:
:; strings - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit | grep applicationDidEnterBackground
applicationDidEnterBackground:
_applicationDidEnterBackground:
-[UIActivityIndicatorView _applicationDidEnterBackground:]