working on it ...

Filters

Explore Public Snippets

Sort by

Found 2 snippets

    public by micheleaiello  2746  0  5  0

    Open Settings (iOS 8 or above)

    BOOL canOpenSettings = (&UIApplicationOpenSettingsURLString != NULL);
    if (canOpenSettings) {
      NSURL *settingsURL = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
      [[UIApplication sharedApplication] openURL:settingsURL];
    }

    public by micheleaiello  263131  0  6  1

    Mark methods as deprecated

    Mark a method (or a whole class) as deprecated. Works in Xcode v4.2 and higher.
    __attribute((deprecated("Use xxx: instead")))
    
    examples:
    
    @interface MyClass : NSObject
      - (void)myOldMethod:(id)param __attribute__((deprecated));
    @end
    
    __attribute__((deprecated))
    @interface MyOldClass : NSObject
    @end
    
    __attribute__((deprecated))
    void myOldFunction(...) {
    }

    List Complete ( 2 snippets total )

    Cannot find what you were looking for?
    Ask the Snip2Code Community

    • Public Snippets
    • Channels Snippets