A Simple RuntimeWrap With Objective-C
将项目目录下SIRuntime
导入项目中
pod 'SIRuntimeWrap', '~> 1.0'
-
导入头文件
#import "SIRuntime.h"
-
创建
RuntimeWrap
SIRuntime *runtime = [SIRuntime runtimeWithClass:self.class] ; SIRuntime *runtime = [SIRuntime runtimeWithClass:self] ;
-
注册新Class,使用
SIRuntimeClass
/// SIRuntimeClass /// 创建一个指定名称的类,父类为空 - (instancetype)initWithName:(NSString *)name; /// 指定父类创建类 - (instancetype)initWithName:(NSString *)name superclass:(Class)superclass; /// SIRuntime /// 删除某类 + (void)removeClass:(SIRuntimeClass *)clazz ; /// 添加某类 + (void)addNewClass:(SIRuntimeClass *)clazz ;
-
更多方法,请查看
SIRuntime
注释
RuntimeWrap is available under the MIT license. See the LICENSE file for more info.