ios - Using Objective-C extension classes in Swift -



ios - Using Objective-C extension classes in Swift -

i trying write new features of objective-c project in swift. have existing objective-c file called nsstring+extensions defined so

@interface nsstring (extensions)

the file named nsstring.extensions.h. have application specific instance methods (ex: stringbyremovingspecialcharacters). have added header file (bridging header), specific in swift compiler - code generation in project settings. added #import "nsstring+extensions.h" in header file. none of methods in extension file can called swift file. how create utilize of extension file in swift? have more extension files - nsdata+encryption.h etc, utilize well.

if add together objective-c file swift project xcode inquire if want add together objective -c bridging header, reply yes. should import files in bridging file , allow phone call them swift files. ps can delete objective-c file has no utilize now.

ios objective-c swift ios8

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -