Closed fastred closed 9 years ago
Indeed. Actually I just put the files in my project, and it works. But would be much better with Cocoapods !
Hey guys, it's perfectly fine to use this lib or any other in Objective-C with Swift through Cocoapods.
In the bridging header file, just use the @import version, like below:
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
@import AHKActionSheet;
and you can use the AHKActionSheet normally
let actionSheet = AHKActionSheet(title: "teste")
actionSheet.addButtonWithTitle("opt 1", type: .Default) { (actionSheet) in
print("tapped")
}
actionSheet.show()
@lucasecf Thanks! I'm closing this issue.
Hi,
I'm facing same issue, sample code
actionSheet.addButtonWithTitle("title", type: AHKActionSheetButtonType.Default, handler: { (AHKActionSheet) in // unable to get to this line on selection })
There's an issue with AHKActionSheet when it's used from Swift app through CocoaPods: https://twitter.com/arnaud_momo/status/621242327537946624