UIView(QMUI_Runtime)

@interface UIView (QMUI_Runtime)

/**
 *  判断当前类是否有重写某个指定的 UIView 的方法
 *  @param selector 要判断的方法
 *  @return YES 表示当前类重写了指定的方法,NO 表示没有重写,使用的是 UIView 默认的实现
 */
- (BOOL)qmui_hasOverrideUIKitMethod:(SEL)selector;

@end

Undocumented

  • 判断当前类是否有重写某个指定的 UIView 的方法

    Declaration

    Objective-C

    - (BOOL)qmui_hasOverrideUIKitMethod:(nonnull SEL)selector;

    Swift

    func qmui_hasOverrideUIKitMethod(_ selector: Selector) -> Bool

    Parameters

    selector

    要判断的方法

    Return Value

    YES 表示当前类重写了指定的方法,NO 表示没有重写,使用的是 UIView 默认的实现