UIPasteboard字符串从Today扩展返回null [英] UIPasteboard string returning null from Today extension

查看:109
本文介绍了UIPasteboard字符串从Today扩展返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS 9/Xcode 7 beta 5中,我似乎无法访问

It seems that in iOS 9/Xcode 7 beta 5, I am unable to access

[[UIPasteboard generalPasteboard] string];  

从我的Today小部件扩展名开始,因为无论内容为何,它都会返回(NULL).我浏览了发行说明,对此一无所获.

from my Today widget extension as every time no matter the contents, it returns (NULL). I looked through the release notes and I did not see anything regarding this.

有什么想法吗?

推荐答案

iOS 9 beta 5似乎是一个未记录的错误,尤其是iOS运行时.相同的代码适用于iOS 9 beta 5上的普通应用程序,以及今天适用于iOS 8.x设备上的小部件.

It seems to be an undocumented bug with iOS 9 beta 5, in particular, the iOS runtime. Same code works with normal app on iOS 9 beta 5, and today widget in iOS 8.x devices.

这篇关于UIPasteboard字符串从Today扩展返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆