Latest 4.0.1
Homepage https://github.com/indieSoftware/INLib
License MIT
Platforms ios 6.0, requires ARC

CocoaDocs

A little iOS Library with common operations, extensions and UI additions.

Features

Classes

  • INBasicTableViewCell: A basic table view cell class for deriving from instead of UITableViewCell to get class methods for loading from a xib file, accessing the cell identifier and registering at a table view.
  • INBasicTableViewHeaderFooterView: A basic table header/footer view class for deriving from instead of UITableViewHeaderFooterView which adds some static methods for creation and determination.
  • INBasicViewController: A basic view controller which introduces a updateView method for subclasses, has a parentController property and can be loaded from a xib file with a static method.
  • INLocalizer: A class for switching the language during runtime and retrieving the corresponding strings from a Localizable.strings file.
  • INNavigationController: A UINavigationController substitution which forwards all rotation requests to the current top view controller and may forward any segue for unwinding calls to the destination segue.
  • INRandom: A randomizer class which uses arc4random().
  • INScrollView: A UIScrollView subclass which can cancel touches on certain view or on views of specific classes.
  • INTableView: A UITableView subclass which can cancel touches on certain views or on views of specific classes.
  • INWindow: A UIWindow subclass which can ignore special events received by asking a delegate.

Categories

  • NSArray: arrayWithSet:, arrayReversed, firstObjectPassingTest:, arrayWithRandomizedOrder, descriptionWithStart:elementFormatter:lastElementFormatter:end:, …
  • NSBundle: direct shortcut accessors for the bundle identifier and version
  • NSDate: Date detail accessing, date comparison, date manipulation, date difference calculations
  • NSDictionary / NSMutableDictionary: type safe accessors / setter, custom description method
  • NSLocale: shortcut methods for the system’s language and country code
  • NSObject: Storing an object at runtime, NSNull comparison, a performSelector implementation
  • NSString: manipulation and comparison methods, comparing and manipulating version strings
  • UIColor: randomColor, colorWithHex:, RGB parts determination
  • UIDevice: iPad determination, simulate a memory warning
  • UIImage: shortcuts for saving as PNG or JPEG, image flipping, masking, scaling
  • UIView: rounded corners, borders, image capturing

Macros

  • DLog() which logs via NSLog() only in DEBUG (non-release) mode.
  • Singleton macro to turn a class easily into a singleton.
  • STRINGIFY_MACROVALUE to get a macro’s value into a NSString.

C-Functions

  • INDirectory-functions for easy access to the documents, caches and tmp directory.
  • INRound, INCeil and INFloor functions which operates on positions after the period, i.e. INRound(6.66, 1) = 6.7

CoreData

  • A separate subspec (to include add to the podfile: pod "INLib/CoreData")
  • NSManagedObject: Some shortcut methods for creating new managed objects and retrieving the object’s name.
  • NSManagedObjectModel: Some helper methods for creating a model, a specific model version and check some compatibility states.
  • CoreDataManager: A class which helps migrating over multiple versions and manages the Core Data Stack.

Examples

To run the example project run pod install from the example’s project directory first (cocoapods installed required).
Then open the workspace file INLibExample.xcworkspace with Xcode and run the example app or the tests.

Requirements

iOS 6+, ARC enabled

Installation

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

pod "INLib"

or clone the repo manually and add the INLib directory to your project.

Include the INLib.h header file into your project to get access to all additions.

Changelog

CHANGELOG.md

TODOs

  • Add many more examples
  • Add many more tests

License

INLib is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "INLib",
    "version": "4.0.1",
    "summary": "A little iOS Library with common tasks.",
    "homepage": "https://github.com/indieSoftware/INLib",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Sven Korset",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/indieSoftware/INLib.git",
        "tag": "4.0.1"
    },
    "source_files": "INLib/*.h",
    "default_subspecs": [
        "CMethods",
        "Macros",
        "Classes",
        "Categories"
    ],
    "subspecs": [
        {
            "name": "CMethods",
            "source_files": "INLib/CMethods/**/*.{h,m}"
        },
        {
            "name": "Macros",
            "source_files": "INLib/Macros/**/*.{h,m}"
        },
        {
            "name": "Classes",
            "source_files": "INLib/Classes/**/*.{h,m}",
            "dependencies": {
                "INLib/Macros": []
            }
        },
        {
            "name": "Categories",
            "source_files": "INLib/Categories/**/*.{h,m}",
            "dependencies": {
                "INLib/Classes": []
            }
        },
        {
            "name": "CoreData",
            "source_files": "INLib/CoreData/**/*.{h,m}",
            "frameworks": "CoreData"
        }
    ]
}

Pin It on Pinterest

Share This