Skip to content

NSObject+TFExecute.m文件中是否去掉引用 #import "ViewController.h"更好? #2

@Dast1Woop

Description

@Dast1Woop

当我的工程中没有这个ViewController.h头文件时,#import "ViewController.h"会报错,我在NSObject+TFExecute.m中
1.删除#import "ViewController.h"
2.
objc_property_t *properties = class_copyPropertyList([ViewController class], &pCount);改为
objc_property_t *properties = class_copyPropertyList([UIViewController class], &pCount);
运行工程错误消失。
ps:大神,我这样做是否会影响本框架其他功能的正常使用,是否会附带产生隐藏bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions