If you perform a class-dump of AppKit it reveals multiple private / hidden classes defined in that framework.
One example is the following class:
__attribute__((visibility("hidden")))
@interface _NSFullScreenWindow : NSWindow
{
}
- (BOOL)canBecomeKeyWindow;
@end
How do you create an instance of a class that is intended to be private / hidden in Objective-C?
I know that private / hidden classes are not meant to be accessed, so no need for moral lessons.
You can access the class by name and instantiate it as following:
Class winClass = NSClassFromString(@"_NSFullScreenWindow");
id win = [winClass new];
Win will be a pointer to an instance of _NSFullScreenWindow after running that code.