MacroOBJC
OBJC_ROOT_CLASS
If you define an Objective-C root class, you receive a compiler error indicating that the class is defined without specifying a base class. You can avoid this compiler error by preceding the definition of the root class (that is, before the
@interface
directive) with OBJC_ROOT_CLASS
.Availability
- iOS 7.0+
- iPadOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Technology
- Objective-C Runtime Objective-Cランタイム
Declaration 宣言
#define OBJC_ROOT_CLASS