【发布时间】:2015-08-05 03:20:05
【问题描述】:
如何检测我的自定义键盘在哪个应用中使用并显示不同的按钮? 例如。在 Twitter 中,我会将 @ 添加到我发布到输入字段和 Reddit /r/
的字符串中【问题讨论】:
-
就像 Schemetrical 所说,您无法确定您所在的应用程序(至少,您不是 supposed 能够,并且可能发布了任何答案这将被视为漏洞并由 Apple 修复),但您可以知道您在 Twitter 样式的文本字段中,并做出适当的回应,这可能比了解应用程序更好,因为那里内置 API,可发布到 Twitter,可从任何应用程序使用。
-
@BenPious 感谢您的启发!我感谢有关“Twitter 样式文本字段”的任何线索
-
您可以在 API 中访问实现此协议的对象(我忘了是哪个):developer.apple.com/library/ios/documentation/UIKit/Reference/…
-
UIKeyboardTypeDefault, UIKeyboardTypeASCIICapable, UIKeyboardTypeNumbersAndPunctuation, UIKeyboardTypeURL, UIKeyboardTypeNumberPad, UIKeyboardTypePhonePad, UIKeyboardTypeNamePhonePad, UIKeyboardTypeEmailAddress, UIKeyboardTypeDecimalPad, UIKeyboardTypeTwitter, UIKeyboardTypeWebSearch, UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable
-
@BenPious 你怎么看这违反了开发者指南?
标签: ios objective-c cocoa-touch keyboard ios-extensions