Skip to content

Instantly share code, notes, and snippets.

@amichnia
Last active February 16, 2019 13:45
Show Gist options
  • Save amichnia/32812a3ed24d7c3a6ea927dc78c28477 to your computer and use it in GitHub Desktop.
Save amichnia/32812a3ed24d7c3a6ea927dc78c28477 to your computer and use it in GitHub Desktop.
// MyPrivateClass.h
@interface MyPrivateClass: NSObject
- (void) doSomethingInternalWithSecretAttribute:(NSInteger)attribute;
@end
// MyPublicClass.swift
public class MyPublicClass {
private let privateClass: MyPrivateClass // We need private ObjC member
...
public func doSomething() {
privateClass.doSomethingInternal(withSecretAttribute: 314)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment