且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS自定义键盘 - 相机无法正常工作

更新时间:2022-11-19 12:07:35

您返回null的原因是您无法访问它。这实际上不是一个bug。根据Apple指南,某些API不适用于iOS 8扩展(请参阅下面的子弹#3)。

The reason you're getting back null is because you don't have access to it. It's actually not a bug. According to Apple guidelines certain APIs are not available to iOS 8 extensions (See bullet #3 below).

这很糟糕,但我总是鼓励人们阅读新功能,看看他们想做什么是可能的,然后再进入一个想法(节省了大量时间)。绝对查看应用程序扩展编程指南了解更多信息。

It sucks, but I always encourage people to read up on new features and see if what they want to do is possible, before dwelling into an idea (Saves a lot of time). Definitely check out the App Extension Programming Guide for more information.