Swift 3.0Runtime 获取系统class属性

因为有写API有改动,所以小写一下,如果以前的一些方法在Swift3.0里没发用了,可以去下面这个官方的API变动文档去看看

https://developer.apple.com/library/prerelease/content/releasenotes/General/watchOS30APIDiffs/Swift/Swift.html

var count : UInt32 = 0;        
    let list = class_copyPropertyList(UIPageControl.classForCoder(),&count)
    for i in 0..) -> String? [static]
        let name = String.init(cString:cc!)

//这样写也是同样的效果
        let name1 = String.init(utf8String : cc!)!
        print(name)
        print(name1)
            }

你可能感兴趣的:(Swift 3.0Runtime 获取系统class属性)