久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      • <bdo id='yrDSr'></bdo><ul id='yrDSr'></ul>
    1. <i id='yrDSr'><tr id='yrDSr'><dt id='yrDSr'><q id='yrDSr'><span id='yrDSr'><b id='yrDSr'><form id='yrDSr'><ins id='yrDSr'></ins><ul id='yrDSr'></ul><sub id='yrDSr'></sub></form><legend id='yrDSr'></legend><bdo id='yrDSr'><pre id='yrDSr'><center id='yrDSr'></center></pre></bdo></b><th id='yrDSr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yrDSr'><tfoot id='yrDSr'></tfoot><dl id='yrDSr'><fieldset id='yrDSr'></fieldset></dl></div>

    2. <small id='yrDSr'></small><noframes id='yrDSr'>

    3. <tfoot id='yrDSr'></tfoot>
      <legend id='yrDSr'><style id='yrDSr'><dir id='yrDSr'><q id='yrDSr'></q></dir></style></legend>
    4. 如何區分iOS5上的屏幕鎖定和主頁按鈕按下?

      How to differentiate between screen lock and home button press on iOS5?(如何區分iOS5上的屏幕鎖定和主頁按鈕按下?)

        <tbody id='4Lowc'></tbody>
        <i id='4Lowc'><tr id='4Lowc'><dt id='4Lowc'><q id='4Lowc'><span id='4Lowc'><b id='4Lowc'><form id='4Lowc'><ins id='4Lowc'></ins><ul id='4Lowc'></ul><sub id='4Lowc'></sub></form><legend id='4Lowc'></legend><bdo id='4Lowc'><pre id='4Lowc'><center id='4Lowc'></center></pre></bdo></b><th id='4Lowc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4Lowc'><tfoot id='4Lowc'></tfoot><dl id='4Lowc'><fieldset id='4Lowc'></fieldset></dl></div>
        <legend id='4Lowc'><style id='4Lowc'><dir id='4Lowc'><q id='4Lowc'></q></dir></style></legend>

        • <bdo id='4Lowc'></bdo><ul id='4Lowc'></ul>
        • <small id='4Lowc'></small><noframes id='4Lowc'>

                <tfoot id='4Lowc'></tfoot>
              • 本文介紹了如何區分iOS5上的屏幕鎖定和主頁按鈕按下?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我正在開發一個在后臺播放音頻的 iPhone 應用.如果用戶鎖定屏幕,我希望音頻繼續播放,但如果他們決定切換到另一個應用程序(通過按下主頁按鈕),則暫停.

                I'm developing an iPhone app that plays audio in the background. I want the audio to keep playing if the user locks the screen, but pause if they decide to switch to another app (by pressing the home button).

                在 iOS 4 上沒有問題,因為應用程序會在屏幕鎖定時進入非活動狀態,并且只有在按下主頁按鈕時才會移動到后臺.在 iOS 5 上,當屏幕鎖定時,應用程序現在也被移到后臺,因此似乎不再可能區分這兩種狀態.這個問題有解決辦法嗎?

                On iOS 4 there was no problem because the app would go into the inactive state when the screen was locked and only be moved to the background if the home button was pressed. On iOS 5 when the screen is locked the app is now also moved into the background, so it seems it is no longer possible to tell the difference between the two states. Is there a solution to this problem?

                推薦答案

                您可以通過檢查 UIApplicationapplicationState 屬性來區分這兩種情況.對于因鎖屏而進入后臺的應用程序,它將設置為 UIApplicationStateInactive,否則設置為 UIApplicationStateBackground.

                You can distinguish these two cases by checking the applicationState property of UIApplication. It will be set to UIApplicationStateInactive for an application that did enter background because of the lock screen, and to UIApplicationStateBackground otherwise.

                - (void)applicationDidEnterBackground:(UIApplication *)application
                {
                    UIApplicationState state = [application applicationState];
                    if (state == UIApplicationStateInactive) {
                        NSLog(@"Sent to background by locking screen");
                    } else if (state == UIApplicationStateBackground) {
                        NSLog(@"Sent to background by home button/switching to other app");
                    } 
                }
                

                這篇關于如何區分iOS5上的屏幕鎖定和主頁按鈕按下?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                To stop segue and show alert(停止 segue 并顯示警報)
                iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                Icon already includes gloss effects(圖標已經包含光澤效果)
                How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))

                1. <i id='1AhbI'><tr id='1AhbI'><dt id='1AhbI'><q id='1AhbI'><span id='1AhbI'><b id='1AhbI'><form id='1AhbI'><ins id='1AhbI'></ins><ul id='1AhbI'></ul><sub id='1AhbI'></sub></form><legend id='1AhbI'></legend><bdo id='1AhbI'><pre id='1AhbI'><center id='1AhbI'></center></pre></bdo></b><th id='1AhbI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1AhbI'><tfoot id='1AhbI'></tfoot><dl id='1AhbI'><fieldset id='1AhbI'></fieldset></dl></div>

                  <small id='1AhbI'></small><noframes id='1AhbI'>

                        <bdo id='1AhbI'></bdo><ul id='1AhbI'></ul>
                      • <tfoot id='1AhbI'></tfoot>

                      • <legend id='1AhbI'><style id='1AhbI'><dir id='1AhbI'><q id='1AhbI'></q></dir></style></legend>

                          <tbody id='1AhbI'></tbody>
                          主站蜘蛛池模板: 精品国产乱码久久久久久丨区2区 | 一区二区免费在线 | 91精品国产色综合久久 | 欧美成人h版在线观看 | 一区二区在线 | 欧美日韩高清在线一区 | 国产精品日韩欧美 | 欧洲性生活视频 | 在线中文视频 | 国产一区二区三区 | 久久久久久久久久一区 | 欧美亚洲视频 | 欧美性受xxx | 成人免费在线观看 | 综合久久综合久久 | 免费视频一区 | 欧美精品一区二区三区四区 | 中文字幕日韩三级 | 成人在线不卡 | 国产分类视频 | 色在线免费 | 国产精品久久久 | 国产一级在线 | 亚洲欧美综合精品另类天天更新 | 日韩一区欧美一区 | 91色视频在线观看 | 日韩精品在线免费观看 | 成人精品视频免费 | 久久精品中文字幕 | 久久成人精品 | 日本欧美在线 | 羞羞的视频免费在线观看 | 精品亚洲二区 | 天天干天天色 | 日本a级大片 | 天天操夜夜操 | 自拍偷拍第一页 | 国产一区二 | av毛片 | 久久久蜜桃 | 亚洲精品久久久久久久久久久久久 |