Closed aliencode closed 7 years ago
var views:[UIView] = [] let view1 = UIView() view1.backgroundColor = UIColor.redColor() let view2 = UIView() view2.backgroundColor = UIColor.greenColor() view.addSubview(view1) view.addSubview(view2) views.append(view1) views.append(view2) view.groupAndFill(group: .Horizontal, views: views, padding: 10)
fatal error: array cannot be bridged from Objective-C
I'm not sure why, but a workaround is:
view.groupAndFill(group: .Horizontal, views: views.map { $0 }, padding: 10)
I think it's a Swift bug.
What version of Swift/Xcode are you on?
fatal error: array cannot be bridged from Objective-C