Latest 0.0.2
Homepage https://github.com/alexiiio/LDCopying
License MIT
Platforms ios 8.0
Authors

Version
996.icu

LDCopying is a category of NSObject. It provides an infinite layer deep copy of objects, include of custom objects and collection objects.

Installation

LDCopying is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'LDCopying'

Useage

Import the header file.

#import <NSObject+LDCopying.h>

Use LDDeepCopy instead of copy or mutableCopy.

[obj LDDeepCopy]

The obj must be key-value coding compliant.

If you want to customize the copy process for a class, you can override the LDDeepCopy method of that class. For example:

@implementation Car
- (id)LDDeepCopy {
    Car *car = [[Car alloc]init];
    car.name = [self.name stringByAppendingString:@"_Copy"];
    return car;
}
@end

Latest podspec

{
    "name": "LDCopying",
    "version": "0.0.2",
    "summary": "Infinite layer deep copy for NSObject.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/alexiiio/LDCopying",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "alexiiio": "[email protected]"
    },
    "source": {
        "git": "https://github.com/alexiiio/LDCopying.git",
        "tag": "v0.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "LDCopying/NSObject+LDCopying/*"
}

Pin It on Pinterest

Share This