Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Use array/dictionary literal syntax instead of nil-terminated lists #6

@MaxGabriel

Description

@MaxGabriel

The nil-terminated lists are more verbose and harder to read. Examples from Heyzap.m

      [NSError
          errorWithDomain:ERROR_DOMAIN
                     code:-57
                 userInfo:[NSDictionary
                              dictionaryWithObjectsAndKeys:ERROR_DOMAIN,
                                                           errorMessage, nil]]);
    NSArray *options = [NSArray
        arrayWithObjects:
            [NSNumber numberWithInteger:HZAdOptionsDisableAutoPrefetching],
            [NSNumber numberWithInteger:HZAdOptionsInstallTrackingOnly],
            [NSNumber numberWithInteger:HZAdOptionsDisableMedation],
            [NSNumber
                numberWithInteger:HZAdOptionsDisableAutomaticIAPRecording],
            [NSNumber numberWithInteger:HZAdOptionsChildDirectedAds], nil];

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions