GithubHelp home page GithubHelp logo

wanderwaltz / frostbit Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 692 KB

A multi-purpose Objective-C library for use with Cocoa Touch projects mostly.

License: MIT License

CSS 3.93% Ruby 2.41% Objective-C 92.07% C 1.59%

frostbit's Introduction

Frostbit

A multi-purpose Objective-C set of classes/categories for use with Cocoa Touch projects mostly. This library contains solutions for problems which I've faced at various points of time while working on iOS projects. Some of these are very specific to a certain task, others may be useful in different scenarios.

I initially intended to use this library as a private scrapbook with snippets of code/useful classes, but eventually decided to make it open just in case someone stumbles on it and finds something useful.

(This generally means that I'm not updating this library as frequently as I possibly should to make it an actual 'product')

Structure

I'm trying to keep this as modular as possible without strong dependencies between the modules. The point is that 'multi-purpose' library is rarely needed as a whole in a single project. So the goal is to allow extracting bits of the library and using these in your code without much hassle.

To help achieving this result the library contains a podspec file to allow downloading it using CocoaPods. As more modules/classes will be added, I'll try to make all of them available via subspecs of the main podspec. So including all the library into your project won't be necessary.

This podspec is not yet available through the general specs repo, so if you'd like to use this library with cocoapods, you'll need to setup your podfile as following:

platform :ios, '6.0'
pod 'Frostbit/Common', :git => 'https://github.com/wanderwaltz/Frostbit.git'

Please note that iOS6 SDK is required. This does not means that the library actyally needs the iOS6 SDK, but I simply don't want to check all the code to determine whether iOS6-specific APIs are being used at some point. When (if?) the next SDK will be out, this lib and its podspec most probably will require iOS7 etc.

Current state

Current root directory structure/contents of the library is the following:

  • Common - Some #define macros which I end up redefining in many of the projects. Aliases for standard types (such as FRBFloat for double) to have a common terminology through the project.�

  • CommonCrypto - SHA1, MD5, Base64 as simple C functions and NSString, NSData categories for these.

  • DataStructures - some special case data structures such as FRBKeyedSet for example which is a dictionary of NSSets and was created for a single purpose, but still seems worthy to be included here as at some point more uses for this kind of data structure may be found.

  • Dispatch - GCD-related stuff and dispatching messages between objects. Currently contains the following:

    • FRBDispatchFunctions - contains GCD-based functions which implement switch-like constructions allowing to perform a certain block depending on the NSString or Class argument passed. Sometimes it seems reasonable enough to have a piece of code look like switch statement, perform like switch statement, but switch the strings or classes instead of just ints.

    • FRBKeyedTargetAction - a class which allows sending multiple different messages to a single target object with the actual message being sent depending on the arbitrary NSCopying-compliant key. Another system which allows making a switch-like constructs for running code, but now @selector-based.

  • Geometry - A couple of nice little functions for manipulating CGPoints, CGRects and CGSizes. All of these are aliased to their FRB-prefixed cousins. So maybe at some point we'll go away from the Core Graphics and implement these as fully custom structs.

  • ManagedObjects - Not to confuse with NSManagedObject, not related to Core Data in any way. This module contains a class which implements NSDictionary-based key-value storage with dynamic property accessor implementation. So you generally can make a property, then add @dynamic propertyName; in the .m file and have this property's value stored in a NSDictionary ivar maintained by FRBManagedObject. Seems useful for small model classes which contain almost no methods, but a lot of properties.

  • UIKit - UIKit-dependent small or not very small UI components.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.