NSObject(FunkyUtilities)

@interface NSObject (FunkyUtilities)

This extension provides simple and easy to use functional and general utilities for NSObject. If you need to prefix the extension methods in this category, you should import NSObject+FunkyPrefixedUtilities.h, where every utility method is prefixed with the funky_ keyword for compatiblitiy reasons.

See

Prefixed counterpart NSObject(FunkyPrefixedUtilities)
  • Applies some logic on the current object and returns it afterwards.

    Declaration

    Objective-C

    - (instancetype)apply:(void (^)(id))block;

    Swift

    func apply(_ block: ((Any?) -> Void)!) -> Self!

    Parameters

    block

    The logiv to be applied on the given object

    Return Value

    The same object after applying the custom logic