how to detect that web app is running in app mode or in safari mode

后端 未结 1 1971
天命终不由人
天命终不由人 2021-01-16 14:48

How to check that a web page is running in safari mode with address bar or in app mode without address bar in iPad

             

        
相关标签:
1条回答
  • 2021-01-16 15:28

    By in app mode I assume you mean when it's launched from the home screen:

    if (window.navigator.standalone) {
    
        /* Launched from home screen code */
    
    }
    

    This works on all iOS devices ASAIK.

    0 讨论(0)
提交回复
热议问题