iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
obiwong
V2EX  ›  iDev

怎样才能在 iphone 模拟器里触发一个应用的 UIApplicationWillTerminateNotification ?

  •  
  •   obiwong · Jul 9, 2011 · 6831 views
    This topic created in 5503 days ago, the information mentioned may be changed or developed.
    4 replies    1970-01-01 08:00:00 +08:00
    keakon
        1
    keakon  
       Jul 9, 2011
    双击home键,然后按住一个图标直到抖动,再关掉你的应用就行了吧。
    obiwong
        2
    obiwong  
    OP
       Jul 9, 2011
    @keakon 我试过了,但我注册的 UIApplicationWillTerminateNotification 事件并没有被触发。

    我在 viewDidLoad 方法里注册了该事件,代码如下:

    http://gist.github.com/1073471
    keakon
        3
    keakon  
       Jul 9, 2011
    Add a line to the app's info.plist.
    Select 'Application does not run in background' and check the box.

    http://goo.gl/xTcMe
    obiwong
        4
    obiwong  
    OP
       Jul 10, 2011
    @keakon 搞定了,非常感谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2823 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:57 · PVG 22:57 · LAX 07:57 · JFK 10:57
    ♥ Do have faith in what you're doing.