Skip to content

Commit

Permalink
add display view, update readme ready for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Nov 7, 2011
1 parent 189eb52 commit 4cfba04
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 56 deletions.
35 changes: 0 additions & 35 deletions Colourlovers.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
/* Begin PBXBuildFile section */
490F4EF014629312002DEF66 /* ColoursTableVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4EEF14629312002DEF66 /* ColoursTableVc.m */; };
490F4EF414629502002DEF66 /* ColourPaletteCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4EF314629502002DEF66 /* ColourPaletteCell.m */; };
490F4EFF14629882002DEF66 /* DCCrossHairView.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4EF714629882002DEF66 /* DCCrossHairView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
490F4F0014629882002DEF66 /* DCFrameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4EF914629882002DEF66 /* DCFrameView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
490F4F0114629882002DEF66 /* DCIntrospect.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4EFB14629882002DEF66 /* DCIntrospect.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
490F4F0214629882002DEF66 /* DCStatusBarOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4EFE14629882002DEF66 /* DCStatusBarOverlay.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
490F4F04146298E1002DEF66 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 490F4F03146298E1002DEF66 /* QuartzCore.framework */; };
490F4F1B14629ED5002DEF66 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4F0714629ED5002DEF66 /* AFHTTPClient.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
490F4F1C14629ED5002DEF66 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 490F4F0914629ED5002DEF66 /* AFHTTPRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
Expand Down Expand Up @@ -43,15 +39,6 @@
490F4EEF14629312002DEF66 /* ColoursTableVc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColoursTableVc.m; sourceTree = "<group>"; };
490F4EF214629502002DEF66 /* ColourPaletteCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColourPaletteCell.h; sourceTree = "<group>"; };
490F4EF314629502002DEF66 /* ColourPaletteCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColourPaletteCell.m; sourceTree = "<group>"; };
490F4EF614629882002DEF66 /* DCCrossHairView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCCrossHairView.h; sourceTree = "<group>"; };
490F4EF714629882002DEF66 /* DCCrossHairView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCCrossHairView.m; sourceTree = "<group>"; };
490F4EF814629882002DEF66 /* DCFrameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCFrameView.h; sourceTree = "<group>"; };
490F4EF914629882002DEF66 /* DCFrameView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCFrameView.m; sourceTree = "<group>"; };
490F4EFA14629882002DEF66 /* DCIntrospect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCIntrospect.h; sourceTree = "<group>"; };
490F4EFB14629882002DEF66 /* DCIntrospect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCIntrospect.m; sourceTree = "<group>"; };
490F4EFC14629882002DEF66 /* DCIntrospectSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCIntrospectSettings.h; sourceTree = "<group>"; };
490F4EFD14629882002DEF66 /* DCStatusBarOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCStatusBarOverlay.h; sourceTree = "<group>"; };
490F4EFE14629882002DEF66 /* DCStatusBarOverlay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCStatusBarOverlay.m; sourceTree = "<group>"; };
490F4F03146298E1002DEF66 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
490F4F0614629ED5002DEF66 /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = "<group>"; };
490F4F0714629ED5002DEF66 /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -111,23 +98,6 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
490F4EF514629882002DEF66 /* DCIntrospect */ = {
isa = PBXGroup;
children = (
490F4EF614629882002DEF66 /* DCCrossHairView.h */,
490F4EF714629882002DEF66 /* DCCrossHairView.m */,
490F4EF814629882002DEF66 /* DCFrameView.h */,
490F4EF914629882002DEF66 /* DCFrameView.m */,
490F4EFA14629882002DEF66 /* DCIntrospect.h */,
490F4EFB14629882002DEF66 /* DCIntrospect.m */,
490F4EFC14629882002DEF66 /* DCIntrospectSettings.h */,
490F4EFD14629882002DEF66 /* DCStatusBarOverlay.h */,
490F4EFE14629882002DEF66 /* DCStatusBarOverlay.m */,
);
name = DCIntrospect;
path = "../../Third Party Apps/DCIntrospect/DCIntrospect";
sourceTree = "<group>";
};
490F4F0514629ED5002DEF66 /* AFNetworking */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -228,7 +198,6 @@
490F4F2D1462A232002DEF66 /* Example */,
490F4F2514629F84002DEF66 /* JSONKit */,
490F4F0514629ED5002DEF66 /* AFNetworking */,
490F4EF514629882002DEF66 /* DCIntrospect */,
49FB05D11462914700CB0BA6 /* AppDelegate.h */,
49FB05D21462914700CB0BA6 /* AppDelegate.m */,
49FB05C91462914700CB0BA6 /* Supporting Files */,
Expand Down Expand Up @@ -314,10 +283,6 @@
49FB05D31462914700CB0BA6 /* AppDelegate.m in Sources */,
490F4EF014629312002DEF66 /* ColoursTableVc.m in Sources */,
490F4EF414629502002DEF66 /* ColourPaletteCell.m in Sources */,
490F4EFF14629882002DEF66 /* DCCrossHairView.m in Sources */,
490F4F0014629882002DEF66 /* DCFrameView.m in Sources */,
490F4F0114629882002DEF66 /* DCIntrospect.m in Sources */,
490F4F0214629882002DEF66 /* DCStatusBarOverlay.m in Sources */,
490F4F1B14629ED5002DEF66 /* AFHTTPClient.m in Sources */,
490F4F1C14629ED5002DEF66 /* AFHTTPRequestOperation.m in Sources */,
490F4F1D14629ED5002DEF66 /* AFImageCache.m in Sources */,
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Colourlovers/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
12 changes: 4 additions & 8 deletions Colourlovers/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,31 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import "AppDelegate.h"
#import "ColoursTableVc.h"
#import "DCIntrospect.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize navController = _tabBarController;
@synthesize navController = _navController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

// setup a sample list of colours controller
// setup a sample list of palettes controller
ColoursTableVc* vc = [[ColoursTableVc alloc] initWithStyle:UITableViewStylePlain];
self.navController = [[UINavigationController alloc] initWithRootViewController:vc];

// always bet on black
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
self.navController.navigationBar.tintColor = [UIColor blackColor];
self.navController.navigationBar.tintColor = [UIColor grayColor];

self.window.rootViewController = self.navController;
[self.window makeKeyAndVisible];

[[DCIntrospect sharedIntrospector] start];

return YES;
}

Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourLovers/ColourLovers.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourLovers/ColourLovers.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import "ColourLovers.h"
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourLovers/ColourPalette.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourLovers/ColourPalette.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import "ColourPalette.h"
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourPaletteCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourPaletteCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import "ColourPaletteCell.h"
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourPaletteView.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 4/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColourPaletteView.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 4/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import "ColourPaletteView.h"
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/ColoursTableVc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
16 changes: 14 additions & 2 deletions Colourlovers/ColoursTableVc.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import "ColoursTableVc.h"
Expand All @@ -19,7 +19,7 @@ - (id)initWithStyle:(UITableViewStyle)style
self = [super initWithStyle:style];
if (self) {
self.tableView.allowsSelection = NO;
self.title = @"thx to colourlovers.com";
self.title = @"Palettes";
self.palettes = nil;
}
return self;
Expand All @@ -46,6 +46,18 @@ - (void)viewDidLoad
*/

// there's also more specialised methods to do paged loads, newest etc.

// setup a nice view to mention colourlovers.com to give them some props
UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 28.0)];
view.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0];
UILabel* label = [[UILabel alloc] initWithFrame:view.frame];
label.font = [UIFont boldSystemFontOfSize:14.0];
label.textColor = [UIColor colorWithWhite:0.45 alpha:1.0];
label.backgroundColor = [UIColor clearColor];
label.text = @"thanks to colourlovers.com";
label.textAlignment = UITextAlignmentCenter;
[view addSubview:label];
self.tableView.tableHeaderView = view;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
Expand Down
2 changes: 1 addition & 1 deletion Colourlovers/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Colourlovers
//
// Created by Andrew Griffiths on 3/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2011 Mad Dog Software. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,22 @@ to the project directory and running
git submodule add https://github.com/johnezang/JSONKit thirdparty/JSONKit
git submodule init thirdparty/JSONKit
git submodule update thirdparty/JSONKit


### Using the library:

NOTE: It's assumed you're using ARC (automatic reference counting) for this library.

Loading colours should be as easy as calling the api and passing a block to handle the callback once
colours have loaded:

[[ColourLovers instance] loadPalettesOfType:ColourPaletteTypeNew success:^(NSArray *palettes) {
self.palettes = palettes;
[self.tableView reloadData];
}];

The code above comes from the example provided (in the file ColoursTableVc).

### Other
There's also other options for calling the library which allow you to load the top palettes, page the list etc.
Please see the source for this, it's not too complicated.

0 comments on commit 4cfba04

Please sign in to comment.