本文介绍了在iOS 8中创建通话中/双倍身高状态栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有标准方法来调用自定义的通话中/双倍身高状态栏?如果没有,那么构建我自己的功能的最佳起点是哪里.我知道关于如何执行此操作已有若干年的历史了,但没有令人满意的答案.有什么新方法可以做到这一点吗? (可能在iOS 8中)

Is there a standard way to invoke a custom in-call/double-height status bar? If not, where's the best place to start in building my own functionality. I know there are a few years-old questions regarding how to do this, but there aren't any satisfying answers. Is there any new way to do this? (Possibly in iOS 8)

推荐答案

这里没有新内容,但我找不到过去对被骗的很好答案,所以...

There's nothing new here, but I'm not finding good past answers to dupe to, so...

您是否要在双高状态栏条件下(例如在通话或导航期间)测试应用的布局?使用模拟器并像往常一样转到菜单栏中的硬件→切换通话中状态栏.

Are you looking to test your app's layout under double-height status bar conditions (e.g. during a call or navigation)? Use the Simulator and go to Hardware → Toggle In-Call Status Bar in the menu bar, just like it's always been.

您是否要进行一些背景活动,导致出现双高状态栏?在这种情况下,系统会根据您执行的某些活动提供状态栏:

Are you looking to do some background activity that causes a double-height status bar to appear? In that case, the status bar is provided by the system in response to you performing certain activities:

  • 记录:在应用程序的Info.plist中设置UIBackgroundModesaudio键.然后,在要录制音频时,在音频会话上设置AVAudioSessionCategoryRecordAVAudioSessionCategoryPlayAndRecord类别.

  • Recording: Set the UIBackgroundModesaudio key in your app's Info.plist. Then, set the AVAudioSessionCategoryRecord or AVAudioSessionCategoryPlayAndRecord category on your audio session when you want to record audio.

VoIP:同样在应用程序的Info.plist中,按UIBackgroundModesvoip键.然后,当您要拨打电话时,在音频会话中设置AVAudioSessionCategoryPlayAndRecord类别.

VoIP: Also et the UIBackgroundModesvoip key in your app's Info.plist. Then, set the AVAudioSessionCategoryPlayAndRecord category on your audio session when you want to make a call.

系统确定状态栏上显示的内容,并且App Store通常不接受将状态栏显示背景模式用于指定目的以外的应用.

The system determines what gets displayed on the status bar, and the App Store generally doesn't accept apps that use the status-bar-displaying background modes for something other than their prescribed purpose.

这篇关于在iOS 8中创建通话中/双倍身高状态栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 16:14