BNBObjC
Objective-C
@interface BNBObjC : NSObject
Swift
class BNBObjC : NSObject
Various helper method to improve Obj-C – Swift interoperability.
-
Call Obj-C method catching
NSException
s and convert then toNSError
s. Example: try BNBObjC.safeCall { // Some code }Declaration
Objective-C
+ (BOOL)safeCall:(nonnull void (^)(void))tryBlock error:(NSError *_Nullable *_Nullable)error;
Swift
class func safeCall(_ tryBlock: @escaping () -> Void) throws
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;