【问题标题】:Xcode Number pad with decimal error带有小数错误的 Xcode 数字键盘
【发布时间】:2013-06-09 10:53:53
【问题描述】:

在 xcode 中,当我为我的文本字段打开 .xib 中的小数键盘选项并运行应用程序时,我收到此错误:

Jun 13 01:22:38 Nicholas-Gibsons-iPhone Quick Utilities[1009] <Error>: 
CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This 
application, or a library it uses, is using an invalid context  and is thereby 
contributing to an overall degradation of system stability and reliability. This notice is 
a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

如果您知道这真正意味着什么,您会得到很多帮助!非常感谢!

【问题讨论】:

  • 你在运行 ios7 beta 吗?当我在 ios7 beta 中显示 UIActionSheet 时,我得到了同样的错误;不过在 ios6.1 中可以正常工作。
  • 是的!我去过开发者论坛,苹果现在已经修复了这个错误!很抱歉我把这个贴在这里,我当时不知道。
  • NicholasGibson - 如果您认为该解决方案对其他人有用,请让 @Zemm 将其发布为“答案”,以便更明显。如果没有,你可以删除线程。
  • UIwebView 中仍然存在这个问题,当我点击打开可编辑 div 键盘的 webview 时,然后双击 webview 会出现类似这样的一堆错误,CGContextSetFillColorWithColor CGContextSetBlendMode: invalid context 0x0 CGContextFillRects: invalid context 0x0 CGContextSetBlendMode:无效上下文 0x0

标签: xcode decimal textfield keypad


【解决方案1】:

尝试以下方法:

textField.keyboardType = UIKeyboardTypeDecimalPad;

【讨论】:

    【解决方案2】:

    检查您是否在任何地方使用 context - 如果是,请在出现的任何地方重命名。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-13
      • 2011-02-07
      • 2013-07-21
      • 1970-01-01
      • 2021-10-20
      • 1970-01-01
      相关资源
      最近更新 更多