SIRuntimeWrap 1.1

SIRuntimeWrap 1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2017

Maintained by Silence0201.



  • By
  • Silence

RuntimeWrap

A Simple RuntimeWrap With Objective-C

使用说明

安装

手工导入

将项目目录下SIRuntime导入项目中

Pod安装
pod 'SIRuntimeWrap', '~> 1.0'

使用

  1. 导入头文件

    #import "SIRuntime.h"
  2. 创建RuntimeWrap

    SIRuntime *runtime = [SIRuntime runtimeWithClass:self.class] ;
    SIRuntime *runtime = [SIRuntime runtimeWithClass:self] ;
  3. 注册新Class,使用SIRuntimeClass

    /// SIRuntimeClass
    /// 创建一个指定名称的类,父类为空
    - (instancetype)initWithName:(NSString *)name;
    /// 指定父类创建类
    - (instancetype)initWithName:(NSString *)name superclass:(Class)superclass;
    
    /// SIRuntime
    /// 删除某类
    + (void)removeClass:(SIRuntimeClass *)clazz ;
    /// 添加某类
    + (void)addNewClass:(SIRuntimeClass *)clazz ;
  4. 更多方法,请查看SIRuntime注释

RuntimeWrap

RuntimeWrap is available under the MIT license. See the LICENSE file for more info.