• swift 各种学习


    swift使用cocoapods引用oc第三方库

    1. 创建桥接文件

    2. 在主工程的 build Settings 搜索 bridge   设置 Objective-C Bridging Heading  为刚刚创建的文件

    3. pod update

    4. 在主工程的 build Settings 搜索 search paths  设置 User Header Search Path 为  $(SRCROOT)  然后选择 recursive(默认的是 nonrecursive)


    swift lldb 调试出错

    http://www.jianshu.com/p/9d030b03dd8b


    swift 使用selector 问题

    @objc func refresh() {
            print("refresh")
            })
        }
    
    let action = #selector(refresh)

    记得一定需要在 func 前面加上 @objc 要不然会出现错误!!! 



    swift debug 模式 release 模式

    http://www.jianshu.com/p/19f6de25e566 

            #if DEBUG1
                print("无法输出1111111")
            #endif
            
            #if DEBUG
                print("可以输出1111111")
            #endif
            
            #if DEBUGTEST
                print("可以输出1111111")
            #endif
            
            #if DEBUGTEST2
                print("无法输出1111111")
            #endif

     编译出错!


  • 相关阅读:
    excel上传和下载
    SublimeText快捷键大全(附GIF演示图)
    JS求多个数组的重复数据
    js各种宽高(3)
    js各种宽高(2)
    js各种宽高(1)
    echarts简单使用案例
    js小技巧
    原生jdbc执行存储过程
    Cron和Spring定时任务
  • 原文地址:https://www.cnblogs.com/xzjxylophone/p/7997868.html
Copyright © 2020-2023  润新知