小编Jig*_*eth的帖子

无法转换表达式的类型'CGRect'以键入'NSCopying!' 在迅速

无法转换表达式的类型'CGRect'以键入'NSCopying!' 在swift中我试图在swift文件中实现键盘通知.

//在发送UIKeyboardDidShowNotification时调用.

  func keyboardWasShown(aNotification :NSNotification)
    {
        var info = aNotification.userInfo
        var kRect:CGRect = info[UIKeyboardFrameBeginUserInfoKey] as CGRect
        var kbSize:CGSize = kRect.size
Run Code Online (Sandbox Code Playgroud)

但不确定为什么我会收到此错误?

swift

4
推荐指数
1
解决办法
1906
查看次数

标签 统计

swift ×1