GithubHelp home page GithubHelp logo

dohoang1102 / es_ios_utils Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jedinorton/es_ios_utils

0.0 2.0 0.0 557 KB

Categories and classes by Eye Street Research to assist in Cocoa Touch development.

Home Page: http://research.eyestreet.com

es_ios_utils's Introduction

Eye Street Research iOS Utils

Peter DeWeese, Eye Street Research, LLC. http://research.eyestreet.com Purpose and Method

The primary purpose of this library is to DRY out verbose iOS code and reduce unnecessicary ceremony using language features such as categories, @dynamic, blocks, and the occasional macro. Rails and Java standards are borrowed from when reasonable. When methods are borrowed from other languages, they should generally be conformed to Objective-C convention. Derivative values should be made available as read only properties whenever possible for code brevity, as in the example @" asdf ".strip.

Installation

I prefer including the source of small libraries in Cocoa Touch projects as git submodules to give full insight, easier contribution, and less compilation changes. Drag the es_ios_utils/es_ios_utils directory to your project and do not select to copy. When testing, open the es_ios_utils project. Importing the entire project and adding its targets as dependencies may be an alternative.

#import "ESUtils.h" imports all of the utility categories and macros. Include it in your .pch file.

###Framework The default build creates a framework that can be included in another project.

###Statically Linked Library There is no target for this right now, but it can be done. When including the compiled library in your project, open the build properties and add -ObjC to "Other Linker Flags". In Xcode 3.x, use -all_load or -force_load. Without this flag, categories may not link properly.

Features

See ESNSCategories.h and ESUICategories.h for more methods.

###isEmpty and isNotEmpty properties Implemented for NSArray, NSDictionary, NSNull โ€“ which is always empty, NSSet, and NSString. nil.isEmpty returns false, so a full check requires !s || s.isEmpty. Preferably, nil.isNotEmpty returns false so no existance check is necessicary.

###macros Very common and generic operations are included as macros for brevity, prefixed with '$'. Examples: $array(object1, object2, nil) $set(object1, object2, nil) $format(@"My Format: %i", 3)

###ESDynamicMethodResolver Use @dynamic to conveniently bind properties files, xml documents, etc. See ESBoundUserDefaults.h for an example.

###UI UIViews frames edition used to require recreation of a CGRect or multiple lines to get a rect from the view, manipulate it, and then set it again. Now you can use a property directly from the UIView, like myView.x += 20.

UITableView convenience methods reduce usage of index paths. Methods that require a row index but no section assume the first section.

###Core Data Blocks are available for error handling and new object configuration.

To Do

  • Add application tests for UI categories and ESBoundUserDefaults.
  • Add application tests for core data.
  • Test framework product.

es_ios_utils's People

Contributors

jim0020 avatar jedinorton avatar pcg79 avatar

Watchers

James Cloos avatar  avatar

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.