zoukankan      html  css  js  c++  java
  • 第13月第10天 swift3.0

    1.

    Type 'Any' has no subscript members

      这一条简直莫名其妙。大体意思就是,你这个类型"Any"不是个数组或者字典,不能按照下标取东西。

      我之前通过一个方法默认创建了一个字典,编译器也认为这是个字典,所以允许我取东西,但是现在编译器翻脸了,说你必须告诉我这是个字典我才能让你取东西。okok。

    1     (dic as! NSDictionary)

      同理还有各种类型不匹配的问题,强制转换就可以了。(偷偷说,真怀念OC的弱类型的时代~)

    http://www.cnblogs.com/SoulKai/p/6056659.html

    2.

            DispatchQueue.global(qos: .background).async {
                // Background Thread
                let rs = db.executeQuery(sql, withArgumentsIn: [])
                
                var arrayM = [NoteItemModel]()
                
                DispatchQueue.main.async {
                    // Run UI Updates
                    callBack(arrayM)
                }
            }

    3.

    Module compiled with swift 3.1 cannot be imported in Swift 3.0.2

    update --no-use-binaries

    https://stackoverflow.com/questions/43238856/module-compiled-with-swift-3-1-cannot-be-imported-in-swift-3-0-2

  • 相关阅读:
    End of 2007, where are you?
    2007年,前进!
    PHP框架Yii快速搭建高并发网站
    需要 gmail 与 wallop 邀请的 请留言给 email
    开始关注Mono了
    百度,阿里巴巴,google
    重返 cnblogs.com
    解决VMware虚拟机桥接不能上网的问题
    SecureCRT
    linux的ssh和sshd配置
  • 原文地址:https://www.cnblogs.com/javastart/p/7644844.html
Copyright © 2011-2022 走看看