怎么能弹出 iPad Pro 的全键盘?

iOSgexiao • 于 2015-12-15 19:48:27 +0800 • 最后由 gexiao2015-12-23 20:27:05 +0800 2998 阅读

file

iPad Pro 里自带应用的键盘是有功能键的大键盘,但是在自己应用里设置 keyboardType 为 UIKeyboardTypeDefault ,还是弹出普通的键盘。Google 了一上午也没有找到谁提这个问题,弄不明白了。

``` typedef NSENUM(NSInteger, UIKeyboardType) { UIKeyboardTypeDefault, // Default type for the current input method. UIKeyboardTypeASCIICapable, // Displays a keyboard which can enter ASCII characters, non-ASCII keyboards remain active UIKeyboardTypeNumbersAndPunctuation, // Numbers and assorted punctuation. UIKeyboardTypeURL, // A type optimized for URL entry (shows . / .com prominently). UIKeyboardTypeNumberPad, // A number pad (0-9). Suitable for PIN entry. UIKeyboardTypePhonePad, // A phone pad (1-9, *, 0, #, with letters under the numbers). UIKeyboardTypeNamePhonePad, // A type optimized for entering a person's name or phone number. UIKeyboardTypeEmailAddress, // A type optimized for multiple email address entry (shows space @ . prominently). UIKeyboardTypeDecimalPad NSENUMAVAILABLEIOS(41), // A number pad with a decimal point. UIKeyboardTypeTwitter NSENUMAVAILABLEIOS(50), // A type optimized for twitter text entry (easy access to @ #) UIKeyboardTypeWebSearch NSENUMAVAILABLEIOS(7_0), // A default keyboard type with URL-oriented addition (shows space . prominently).

UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable, // Deprecated

}; ```

回复: 6
  • iBcker 2015-12-15 20:09:09 +0800

    奇怪··刚直接建个demo是可以出来的···Universal的工程

  • gexiao 2015-12-15 20:31:38 +0800

    @iBcker 你是用xib写的?纯代码试试呢

  • iBcker 2015-12-15 22:29:04 +0800

    @gexiao 也试了··也行~我感觉如果老工程不行的话估计是plist里有某个选项啥的~不过也是瞎猜·

  • gexiao 2015-12-15 22:31:57 +0800

    @iBcker 我自己刚才也都新弄了个 demo 试了试可以,这个好奇怪,我去对比 plist 看看。

  • gexiao 2015-12-15 23:01:36 +0800

    @iBcker 找不出原因,我要放弃了。等段时间再看看其他人会不会提类似的问题。

  • gexiao 2015-12-23 20:27:05 +0800 2

    @iBcker 在 Apple 的论坛找到原因了,要给 launch storyboard。我们现在的项目里直接是 launch image source

    参考: https://forums.developer.apple.com/thread/26357 https://openradar.appspot.com/23649857

  • 请注意单词拼写,以及中英文排版,参考此页
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`, 更多语法请见这里 Markdown 语法
  • 支持表情,见 Emoji cheat sheet
  • @name 会链接到用户页面,并会通知他
  • 上传图片, 支持拖拽和剪切板黏贴上传, 格式限制 - jpg, png, gif
Ctrl+Enter