NS_SWIFT_NAME Usage

Hi all,
Is there any place where I can find some extended docs on NS_SWIFT_NAME options?

I have an obj-c only project and I would like to achieve something like this if possible by using NS_SWIFT_NAME or something similar

CG_EXTERN bool CGRectMakeWithDictionaryRepresentation(CFDictionaryRef cg_nullable dict, CGRect * cg_nullable rect)
 
// becomes this in Swift
 
extension CGRect {
    public init?(dictionaryRepresentation dict: CFDictionary)
}

If you haven’t already, you might want to check out Objective-C and C Code Customization. IIRC, NS_REFINED_FOR_SWIFT is a bit of a larger escape hatch for renaming things.

Terms of Service

Privacy Policy

Cookie Policy