Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Various bits of code that are constantly reused by ZDS and are under a BSD license

branch: master

Fixed a subtle ordering bug.

latest commit e6ceb941dd
Patrick Hughes authored August 31, 2012
Octocat-spinner-32 AssetManagerTest Work on test project for asset manager March 29, 2011
Octocat-spinner-32 FJImporter ZDSStreamJSONParser and start of sample project November 03, 2011
Octocat-spinner-32 .gitignore Work on test project for asset manager March 29, 2011
Octocat-spinner-32 .gitmodules Work on test project for asset manager March 29, 2011
Octocat-spinner-32 NSData+ZSAdditions.h Start of new asset manager March 18, 2011
Octocat-spinner-32 NSData+ZSAdditions.m Start of new asset manager March 18, 2011
Octocat-spinner-32 NSString+ZSAdditions.h Start of new asset manager March 18, 2011
Octocat-spinner-32 NSString+ZSAdditions.m Start of new asset manager March 18, 2011
Octocat-spinner-32 README.markdown Update readme April 30, 2011
Octocat-spinner-32 UIImageView+ZSAssetManagerAdditions.h Added a block based interface to ZSAssetManager. Added an AFNetworkin… August 08, 2012
Octocat-spinner-32 UIImageView+ZSAssetManagerAdditions.m Fixed a subtle ordering bug. August 31, 2012
Octocat-spinner-32 ZDSStreamJSONParser.h ZDSStreamJSONParser and start of sample project November 03, 2011
Octocat-spinner-32 ZDSStreamJSONParser.m ZDSStreamJSONParser and start of sample project November 03, 2011
Octocat-spinner-32 ZSAssetManager.h Added a block based interface to ZSAssetManager. Added an AFNetworkin… August 08, 2012
Octocat-spinner-32 ZSAssetManager.m Added a block based interface to ZSAssetManager. Added an AFNetworkin… August 08, 2012
Octocat-spinner-32 ZSContextWatcher.h Initial commit of common code September 23, 2010
Octocat-spinner-32 ZSContextWatcher.m Fixed potential nil issue with context watcher September 30, 2010
Octocat-spinner-32 ZSReachability.h Start of new asset manager March 18, 2011
Octocat-spinner-32 ZSReachability.m Start of new asset manager March 18, 2011
Octocat-spinner-32 ZSURLConnectionDelegate.h Start of new asset manager March 18, 2011
Octocat-spinner-32 ZSURLConnectionDelegate.m Fixed issue with offlining of asset manager April 30, 2011
README.markdown

Shared Source Code

In this repository is code that we share between many projects that we work on. It is licensed under the BSD license and is free to use as you wish.

Prefix.pch

You will probably find macros in this code that does not compile. The reason is that we have several macros that we add to our Prefix.pch file upon project creation. Those macros are as follows:

#ifdef DEBUG
  #define MCRelease(x) [x release]
  #define DLog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__])
  #define DCLog(...) NSLog(@"%@", [NSString stringWithFormat:__VA_ARGS__])
  #define ALog(...) {NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__]);[[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__];}
#else
  #define MCRelease(x) [x release], x = nil
  #define DLog(...) do { } while (0)
  #define DCLog(...) do { } while (0)
  #ifndef NS_BLOCK_ASSERTIONS
    #define NS_BLOCK_ASSERTIONS
  #endif
  #define ALog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__])
#endif

#define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)

#define ISRETINADISPLAY (([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) ? [[UIScreen mainScreen] scale] > 1.0 : NO)

#define degreesToRadians(x) (M_PI * x / 180.0)

Adding these macros to your Prefix.pch will resolve any compile issues.

Something went wrong with that request. Please try again.