因为有写API有改动,所以小写一下,如果以前的一些方法在Swift3.0里没发用了,可以去下面这个官方的API变动文档去看看
var count : UInt32 = 0;
let list = class_copyPropertyList(UIPageControl.classForCoder(),&count)
for i in 0..<count
{
let aa = list?[Int(i)]
let cc = property_getName(aa)
//下面这个方法就是新加的,删掉了以前的
//String.fromCString(_: UnsafePointer<CChar>) -> String? [static]
let name = String.init(cString:cc!)
//这样写也是同样的效果
let name1 = String.init(utf8String : cc!)!
print(name)
print(name1)
}