diff --git a/GraphKit/Example/ExampleListVC.m b/GraphKit/Example/ExampleListVC.m index 67d327e..84a8ed3 100644 --- a/GraphKit/Example/ExampleListVC.m +++ b/GraphKit/Example/ExampleListVC.m @@ -10,6 +10,7 @@ #import "ExampleBarVC.h" #import "ExampleBarGraphVC.h" +#import "ExampleStackedBarGraphVC.h" #import "ExampleLineGraph.h" #import "UIColor+GraphKit.h" @@ -26,7 +27,7 @@ - (void)viewDidLoad { self.title = @"GraphKit"; self.view.backgroundColor = [UIColor gk_cloudsColor]; - self.data = @[@"Bar", @"Bar Graph", @"Line Graph"]; + self.data = @[@"Bar", @"Bar Graph", @"Stacked Bar Graph", @"Line Graph"]; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellID"]; @@ -53,6 +54,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath vc = [[ExampleBarGraphVC alloc] initWithNibName:@"ExampleBarGraphVC" bundle:nil]; break; case 2: + vc = [[ExampleStackedBarGraphVC alloc] initWithNibName:@"ExampleStackedBarGraphVC" bundle:nil]; + break; + case 3: vc = [[ExampleLineGraph alloc] initWithNibName:@"ExampleLineGraph" bundle:nil]; break; default: diff --git a/GraphKit/Example/ExampleListVC.xib b/GraphKit/Example/ExampleListVC.xib index cd1b654..ae2a7d5 100644 --- a/GraphKit/Example/ExampleListVC.xib +++ b/GraphKit/Example/ExampleListVC.xib @@ -1,7 +1,8 @@ - + - + + @@ -26,9 +27,12 @@ - - + + + + + diff --git a/GraphKit/Example/ExampleStackedBarGraphVC.h b/GraphKit/Example/ExampleStackedBarGraphVC.h new file mode 100644 index 0000000..2a3b894 --- /dev/null +++ b/GraphKit/Example/ExampleStackedBarGraphVC.h @@ -0,0 +1,26 @@ +// +// ExampleStackedBarGraphVC.h +// GraphKit +// +// Created by Erich Grunewald on 27/04/15. +// Copyright (c) 2015 Michal Konturek. All rights reserved. +// + +#import + +#import "GraphKit.h" + +@interface ExampleStackedBarGraphVC : UIViewController + +@property (nonatomic, weak) IBOutlet GKStackedBarGraph *graphView; + +@property (nonatomic, strong) NSArray *data; +@property (nonatomic, strong) NSArray *labels; + +- (IBAction)onButtonFill:(id)sender; + +- (IBAction)onButtonChange:(id)sender; + +- (IBAction)onButtonReset:(id)sender; + +@end diff --git a/GraphKit/Example/ExampleStackedBarGraphVC.m b/GraphKit/Example/ExampleStackedBarGraphVC.m new file mode 100644 index 0000000..b3ca648 --- /dev/null +++ b/GraphKit/Example/ExampleStackedBarGraphVC.m @@ -0,0 +1,102 @@ +// +// ExampleStackedBarGraphVC.m +// GraphKit +// +// Created by Erich Grunewald on 27/04/15. +// Copyright (c) 2015 Michal Konturek. All rights reserved. +// + +#import "ExampleStackedBarGraphVC.h" + +#import "UIViewController+BButton.h" + +@interface ExampleStackedBarGraphVC () + +@property (nonatomic, strong) NSArray *colors; +@property (nonatomic, assign) BOOL warmColors; + +@end + +@implementation ExampleStackedBarGraphVC + +- (void)viewDidLoad { + [super viewDidLoad]; + self.edgesForExtendedLayout = UIRectEdgeNone; + + [self setupButtons]; + + self.view.backgroundColor = [UIColor gk_cloudsColor]; + + self.data = @[@[@11, @14, @49, @12], + @[@25, @4, @8, @8], + @[@7, @38, @17, @28], + @[@28, @5, @8, @59]]; + self.labels = @[@"DE", @"PL", @"CN", @"JP"]; + + self.colors = @[@[[UIColor gk_midnightBlueColor], + [UIColor gk_wisteriaColor], + [UIColor gk_peterRiverColor], + [UIColor gk_emerlandColor] + ], + @[[UIColor gk_pomegranateColor], + [UIColor gk_alizarinColor], + [UIColor gk_sunflowerColor], + [UIColor gk_amethystColor] + ]]; + + self.graphView.dataSource = self; + + [self.graphView draw]; + + self.warmColors = NO; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)onButtonFill:(id)sender { + [self.graphView draw]; +} + +- (IBAction)onButtonChange:(id)sender { + self.warmColors = !self.warmColors; + self.graphView.barColors = self.colors[self.warmColors]; +} + +- (IBAction)onButtonReset:(id)sender { + [self.graphView reset]; +} + + +#pragma mark - GKStackedBarGraphDataSource + +- (NSInteger)numberOfBars { + return [self.data count]; +} + +- (NSInteger)numberOfStacks { + return [[self.data firstObject] count]; +} + +- (NSNumber *)valueForBarAtIndex:(NSInteger)index stack:(NSInteger)stack { + return self.data[index][stack]; +} + +- (UIColor *)colorForBarAtIndex:(NSInteger)index stack:(NSInteger)stack { + return self.colors[0][stack]; +} + +- (NSString *)titleForBarAtIndex:(NSInteger)index { + return self.labels[index]; +} + +- (CFTimeInterval)animationDurationForBarAtIndex:(NSInteger)index { + id barValues = self.data[index]; + CGFloat percentage = [[barValues valueForKeyPath:@"@sum.self"] doubleValue]; + percentage = (percentage / 100); + return (self.graphView.animationDuration * percentage); +} + +@end diff --git a/GraphKit/Example/ExampleStackedBarGraphVC.xib b/GraphKit/Example/ExampleStackedBarGraphVC.xib new file mode 100644 index 0000000..2a49566 --- /dev/null +++ b/GraphKit/Example/ExampleStackedBarGraphVC.xib @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GraphKit/GraphKit.xcodeproj/project.pbxproj b/GraphKit/GraphKit.xcodeproj/project.pbxproj index b5daeb0..0c873ae 100644 --- a/GraphKit/GraphKit.xcodeproj/project.pbxproj +++ b/GraphKit/GraphKit.xcodeproj/project.pbxproj @@ -1,1535 +1,648 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 74E12B5B49644056930176BC - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods.a - sourceTree - BUILT_PRODUCTS_DIR - - 83175F7BAC184C238C8A7ED0 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - 84654C0718FE8EE200160F11 - - children - - 84654C1918FE8EE300160F11 - 84654C3218FE8EE300160F11 - 84654C1218FE8EE300160F11 - 84654C1118FE8EE300160F11 - D66EB86FC82255B51279B314 - - isa - PBXGroup - sourceTree - <group> - - 84654C0818FE8EE200160F11 - - attributes - - LastUpgradeCheck - 0510 - ORGANIZATIONNAME - Michal Konturek - TargetAttributes - - 84654C2A18FE8EE300160F11 - - TestTargetID - 84654C0F18FE8EE200160F11 - - - - buildConfigurationList - 84654C0B18FE8EE200160F11 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - - mainGroup - 84654C0718FE8EE200160F11 - productRefGroup - 84654C1118FE8EE300160F11 - projectDirPath - - projectReferences - - projectRoot - - targets - - 84654C0F18FE8EE200160F11 - 84654C2A18FE8EE300160F11 - - - 84654C0B18FE8EE200160F11 - - buildConfigurations - - 84654C3A18FE8EE300160F11 - 84654C3B18FE8EE300160F11 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 84654C0C18FE8EE200160F11 - - buildActionMask - 2147483647 - files - - 847259231904ABE200819664 - 8472592F1905D63500819664 - 84654C5518FEDCDF00160F11 - 84654C2418FE8EE300160F11 - 847259291905C1D300819664 - 84654C5918FF4C8300160F11 - 8472591E1904AA4F00819664 - 84654C4C18FE909A00160F11 - 84654C2018FE8EE300160F11 - 84F0E98E1902B30C00FA4810 - 84654C5118FE934800160F11 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 84654C0D18FE8EE200160F11 - - buildActionMask - 2147483647 - files - - 84654C1618FE8EE300160F11 - 84654C1818FE8EE300160F11 - 84654C1418FE8EE300160F11 - 973F4746059343C9A462AA2D - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 84654C0E18FE8EE200160F11 - - buildActionMask - 2147483647 - files - - 84654C1E18FE8EE300160F11 - 84654C2618FE8EE300160F11 - 84654C5A18FF4C8300160F11 - 84F0E98F1902B30C00FA4810 - 84654C5218FE934800160F11 - 8472591F1904AA4F00819664 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 84654C0F18FE8EE200160F11 - - buildConfigurationList - 84654C3C18FE8EE300160F11 - buildPhases - - 83175F7BAC184C238C8A7ED0 - 84654C0C18FE8EE200160F11 - 84654C0D18FE8EE200160F11 - 84654C0E18FE8EE200160F11 - D08870F64023490D9D34D82D - - buildRules - - dependencies - - isa - PBXNativeTarget - name - GraphKit - productName - GraphKit - productReference - 84654C1018FE8EE300160F11 - productType - com.apple.product-type.application - - 84654C1018FE8EE300160F11 - - explicitFileType - wrapper.application - includeInIndex - 0 - isa - PBXFileReference - path - GraphKit.app - sourceTree - BUILT_PRODUCTS_DIR - - 84654C1118FE8EE300160F11 - - children - - 84654C1018FE8EE300160F11 - 84654C2B18FE8EE300160F11 - - isa - PBXGroup - name - Products - sourceTree - <group> - - 84654C1218FE8EE300160F11 - - children - - 84654C1318FE8EE300160F11 - 84654C1518FE8EE300160F11 - 84654C1718FE8EE300160F11 - 84654C2C18FE8EE300160F11 - 74E12B5B49644056930176BC - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 84654C1318FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - System/Library/Frameworks/Foundation.framework - sourceTree - SDKROOT - - 84654C1418FE8EE300160F11 - - fileRef - 84654C1318FE8EE300160F11 - isa - PBXBuildFile - - 84654C1518FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreGraphics.framework - path - System/Library/Frameworks/CoreGraphics.framework - sourceTree - SDKROOT - - 84654C1618FE8EE300160F11 - - fileRef - 84654C1518FE8EE300160F11 - isa - PBXBuildFile - - 84654C1718FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - UIKit.framework - path - System/Library/Frameworks/UIKit.framework - sourceTree - SDKROOT - - 84654C1818FE8EE300160F11 - - fileRef - 84654C1718FE8EE300160F11 - isa - PBXBuildFile - - 84654C1918FE8EE300160F11 - - children - - 84654C4D18FE932A00160F11 - 84654C4218FE8EF300160F11 - 84654C2218FE8EE300160F11 - 84654C2318FE8EE300160F11 - 84654C2518FE8EE300160F11 - 84654C1A18FE8EE300160F11 - - isa - PBXGroup - path - GraphKit - sourceTree - <group> - - 84654C1A18FE8EE300160F11 - - children - - 84654C1B18FE8EE300160F11 - 84654C1C18FE8EE300160F11 - 84654C1F18FE8EE300160F11 - 84654C2118FE8EE300160F11 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 84654C1B18FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - GraphKit-Info.plist - sourceTree - <group> - - 84654C1C18FE8EE300160F11 - - children - - 84654C1D18FE8EE300160F11 - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 84654C1D18FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 84654C1E18FE8EE300160F11 - - fileRef - 84654C1C18FE8EE300160F11 - isa - PBXBuildFile - - 84654C1F18FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - main.m - sourceTree - <group> - - 84654C2018FE8EE300160F11 - - fileRef - 84654C1F18FE8EE300160F11 - isa - PBXBuildFile - - 84654C2118FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - GraphKit-Prefix.pch - sourceTree - <group> - - 84654C2218FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AppDelegate.h - sourceTree - <group> - - 84654C2318FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AppDelegate.m - sourceTree - <group> - - 84654C2418FE8EE300160F11 - - fileRef - 84654C2318FE8EE300160F11 - isa - PBXBuildFile - - 84654C2518FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - folder.assetcatalog - path - Images.xcassets - sourceTree - <group> - - 84654C2618FE8EE300160F11 - - fileRef - 84654C2518FE8EE300160F11 - isa - PBXBuildFile - - 84654C2718FE8EE300160F11 - - buildActionMask - 2147483647 - files - - 84654C3918FE8EE300160F11 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 84654C2818FE8EE300160F11 - - buildActionMask - 2147483647 - files - - 84654C2D18FE8EE300160F11 - 84654C2F18FE8EE300160F11 - 84654C2E18FE8EE300160F11 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 84654C2918FE8EE300160F11 - - buildActionMask - 2147483647 - files - - 84654C3718FE8EE300160F11 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 84654C2A18FE8EE300160F11 - - buildConfigurationList - 84654C3F18FE8EE300160F11 - buildPhases - - 84654C2718FE8EE300160F11 - 84654C2818FE8EE300160F11 - 84654C2918FE8EE300160F11 - - buildRules - - dependencies - - 84654C3118FE8EE300160F11 - - isa - PBXNativeTarget - name - GraphKitTests - productName - GraphKitTests - productReference - 84654C2B18FE8EE300160F11 - productType - com.apple.product-type.bundle.unit-test - - 84654C2B18FE8EE300160F11 - - explicitFileType - wrapper.cfbundle - includeInIndex - 0 - isa - PBXFileReference - path - GraphKitTests.xctest - sourceTree - BUILT_PRODUCTS_DIR - - 84654C2C18FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - XCTest.framework - path - Library/Frameworks/XCTest.framework - sourceTree - DEVELOPER_DIR - - 84654C2D18FE8EE300160F11 - - fileRef - 84654C2C18FE8EE300160F11 - isa - PBXBuildFile - - 84654C2E18FE8EE300160F11 - - fileRef - 84654C1318FE8EE300160F11 - isa - PBXBuildFile - - 84654C2F18FE8EE300160F11 - - fileRef - 84654C1718FE8EE300160F11 - isa - PBXBuildFile - - 84654C3018FE8EE300160F11 - - containerPortal - 84654C0818FE8EE200160F11 - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 84654C0F18FE8EE200160F11 - remoteInfo - GraphKit - - 84654C3118FE8EE300160F11 - - isa - PBXTargetDependency - target - 84654C0F18FE8EE200160F11 - targetProxy - 84654C3018FE8EE300160F11 - - 84654C3218FE8EE300160F11 - - children - - 84654C3818FE8EE300160F11 - 84654C3318FE8EE300160F11 - - isa - PBXGroup - path - GraphKitTests - sourceTree - <group> - - 84654C3318FE8EE300160F11 - - children - - 84654C3418FE8EE300160F11 - 84654C3518FE8EE300160F11 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 84654C3418FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - GraphKitTests-Info.plist - sourceTree - <group> - - 84654C3518FE8EE300160F11 - - children - - 84654C3618FE8EE300160F11 - - isa - PBXVariantGroup - name - InfoPlist.strings - sourceTree - <group> - - 84654C3618FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - text.plist.strings - name - en - path - en.lproj/InfoPlist.strings - sourceTree - <group> - - 84654C3718FE8EE300160F11 - - fileRef - 84654C3518FE8EE300160F11 - isa - PBXBuildFile - - 84654C3818FE8EE300160F11 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - GraphKitTests.m - sourceTree - <group> - - 84654C3918FE8EE300160F11 - - fileRef - 84654C3818FE8EE300160F11 - isa - PBXBuildFile - - 84654C3A18FE8EE300160F11 - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - YES - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 7.1 - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - USER_HEADER_SEARCH_PATHS - $(SRCROOT)/** - - isa - XCBuildConfiguration - name - Debug - - 84654C3B18FE8EE300160F11 - - buildSettings - - ALWAYS_SEARCH_USER_PATHS - YES - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - YES - ENABLE_NS_ASSERTIONS - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 7.1 - SDKROOT - iphoneos - USER_HEADER_SEARCH_PATHS - $(SRCROOT)/** - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 84654C3C18FE8EE300160F11 - - buildConfigurations - - 84654C3D18FE8EE300160F11 - 84654C3E18FE8EE300160F11 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 84654C3D18FE8EE300160F11 - - baseConfigurationReference - 8AEF73567DD4B30E5A877C5C - buildSettings - - ALWAYS_SEARCH_USER_PATHS - YES - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - GraphKit/GraphKit-Prefix.pch - INFOPLIST_FILE - GraphKit/GraphKit-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - USER_HEADER_SEARCH_PATHS - $(SRCROOT)/** - WRAPPER_EXTENSION - app - - isa - XCBuildConfiguration - name - Debug - - 84654C3E18FE8EE300160F11 - - baseConfigurationReference - 873AC9F69410844871F60371 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - YES - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - GraphKit/GraphKit-Prefix.pch - INFOPLIST_FILE - GraphKit/GraphKit-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - USER_HEADER_SEARCH_PATHS - $(SRCROOT)/** - WRAPPER_EXTENSION - app - - isa - XCBuildConfiguration - name - Release - - 84654C3F18FE8EE300160F11 - - buildConfigurations - - 84654C4018FE8EE300160F11 - 84654C4118FE8EE300160F11 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 84654C4018FE8EE300160F11 - - buildSettings - - BUNDLE_LOADER - $(BUILT_PRODUCTS_DIR)/GraphKit.app/GraphKit - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - GraphKit/GraphKit-Prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - INFOPLIST_FILE - GraphKitTests/GraphKitTests-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - TEST_HOST - $(BUNDLE_LOADER) - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Debug - - 84654C4118FE8EE300160F11 - - buildSettings - - BUNDLE_LOADER - $(BUILT_PRODUCTS_DIR)/GraphKit.app/GraphKit - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - $(DEVELOPER_FRAMEWORKS_DIR) - - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - GraphKit/GraphKit-Prefix.pch - INFOPLIST_FILE - GraphKitTests/GraphKitTests-Info.plist - PRODUCT_NAME - $(TARGET_NAME) - TEST_HOST - $(BUNDLE_LOADER) - WRAPPER_EXTENSION - xctest - - isa - XCBuildConfiguration - name - Release - - 84654C4218FE8EF300160F11 - - children - - 84654C4618FE8F0600160F11 - 847259271905C1D300819664 - 847259281905C1D300819664 - 84654C4918FE907500160F11 - 847259201904AB8F00819664 - - isa - PBXGroup - name - Source - path - ../../Source - sourceTree - <group> - - 84654C4618FE8F0600160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - GraphKit.h - sourceTree - <group> - - 84654C4918FE907500160F11 - - children - - 84654C4A18FE909A00160F11 - 84654C4B18FE909A00160F11 - 84654C5318FEDCDF00160F11 - 84654C5418FEDCDF00160F11 - - isa - PBXGroup - path - BarGraph - sourceTree - <group> - - 84654C4A18FE909A00160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - GKBar.h - sourceTree - <group> - - 84654C4B18FE909A00160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - GKBar.m - sourceTree - <group> - - 84654C4C18FE909A00160F11 - - fileRef - 84654C4B18FE909A00160F11 - isa - PBXBuildFile - - 84654C4D18FE932A00160F11 - - children - - 84F0E98B1902B30C00FA4810 - 84F0E98C1902B30C00FA4810 - 84F0E98D1902B30C00FA4810 - 84654C4E18FE934800160F11 - 84654C4F18FE934800160F11 - 84654C5018FE934800160F11 - 84654C5618FF4C8300160F11 - 84654C5718FF4C8300160F11 - 84654C5818FF4C8300160F11 - 8472591B1904AA4F00819664 - 8472591C1904AA4F00819664 - 8472591D1904AA4F00819664 - 8472592D1905D63500819664 - 8472592E1905D63500819664 - - isa - PBXGroup - path - Example - sourceTree - SOURCE_ROOT - - 84654C4E18FE934800160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ExampleBarVC.h - sourceTree - <group> - - 84654C4F18FE934800160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ExampleBarVC.m - sourceTree - <group> - - 84654C5018FE934800160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - file.xib - path - ExampleBarVC.xib - sourceTree - <group> - - 84654C5118FE934800160F11 - - fileRef - 84654C4F18FE934800160F11 - isa - PBXBuildFile - - 84654C5218FE934800160F11 - - fileRef - 84654C5018FE934800160F11 - isa - PBXBuildFile - - 84654C5318FEDCDF00160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - GKBarGraph.h - sourceTree - <group> - - 84654C5418FEDCDF00160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - GKBarGraph.m - sourceTree - <group> - - 84654C5518FEDCDF00160F11 - - fileRef - 84654C5418FEDCDF00160F11 - isa - PBXBuildFile - - 84654C5618FF4C8300160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ExampleBarGraphVC.h - sourceTree - <group> - - 84654C5718FF4C8300160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ExampleBarGraphVC.m - sourceTree - <group> - - 84654C5818FF4C8300160F11 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - file.xib - path - ExampleBarGraphVC.xib - sourceTree - <group> - - 84654C5918FF4C8300160F11 - - fileRef - 84654C5718FF4C8300160F11 - isa - PBXBuildFile - - 84654C5A18FF4C8300160F11 - - fileRef - 84654C5818FF4C8300160F11 - isa - PBXBuildFile - - 8472591B1904AA4F00819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ExampleLineGraph.h - sourceTree - <group> - - 8472591C1904AA4F00819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ExampleLineGraph.m - sourceTree - <group> - - 8472591D1904AA4F00819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - file.xib - path - ExampleLineGraph.xib - sourceTree - <group> - - 8472591E1904AA4F00819664 - - fileRef - 8472591C1904AA4F00819664 - isa - PBXBuildFile - - 8472591F1904AA4F00819664 - - fileRef - 8472591D1904AA4F00819664 - isa - PBXBuildFile - - 847259201904AB8F00819664 - - children - - 847259211904ABE200819664 - 847259221904ABE200819664 - - isa - PBXGroup - path - LineGraph - sourceTree - <group> - - 847259211904ABE200819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - GKLineGraph.h - sourceTree - <group> - - 847259221904ABE200819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - GKLineGraph.m - sourceTree - <group> - - 847259231904ABE200819664 - - fileRef - 847259221904ABE200819664 - isa - PBXBuildFile - - 847259271905C1D300819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - UIColor+GraphKit.h - sourceTree - <group> - - 847259281905C1D300819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - UIColor+GraphKit.m - sourceTree - <group> - - 847259291905C1D300819664 - - fileRef - 847259281905C1D300819664 - isa - PBXBuildFile - - 8472592D1905D63500819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - UIViewController+BButton.h - sourceTree - <group> - - 8472592E1905D63500819664 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - UIViewController+BButton.m - sourceTree - <group> - - 8472592F1905D63500819664 - - fileRef - 8472592E1905D63500819664 - isa - PBXBuildFile - - 84F0E98B1902B30C00FA4810 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ExampleListVC.h - sourceTree - <group> - - 84F0E98C1902B30C00FA4810 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ExampleListVC.m - sourceTree - <group> - - 84F0E98D1902B30C00FA4810 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - file.xib - path - ExampleListVC.xib - sourceTree - <group> - - 84F0E98E1902B30C00FA4810 - - fileRef - 84F0E98C1902B30C00FA4810 - isa - PBXBuildFile - - 84F0E98F1902B30C00FA4810 - - fileRef - 84F0E98D1902B30C00FA4810 - isa - PBXBuildFile - - 873AC9F69410844871F60371 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.release.xcconfig - path - Pods/Target Support Files/Pods/Pods.release.xcconfig - sourceTree - <group> - - 8AEF73567DD4B30E5A877C5C - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.debug.xcconfig - path - Pods/Target Support Files/Pods/Pods.debug.xcconfig - sourceTree - <group> - - 973F4746059343C9A462AA2D - - fileRef - 74E12B5B49644056930176BC - isa - PBXBuildFile - - D08870F64023490D9D34D82D - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" - - showEnvVarsInLog - 0 - - D66EB86FC82255B51279B314 - - children - - 8AEF73567DD4B30E5A877C5C - 873AC9F69410844871F60371 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - - rootObject - 84654C0818FE8EE200160F11 - - +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 84654C1418FE8EE300160F11 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84654C1318FE8EE300160F11 /* Foundation.framework */; }; + 84654C1618FE8EE300160F11 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84654C1518FE8EE300160F11 /* CoreGraphics.framework */; }; + 84654C1818FE8EE300160F11 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84654C1718FE8EE300160F11 /* UIKit.framework */; }; + 84654C1E18FE8EE300160F11 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84654C1C18FE8EE300160F11 /* InfoPlist.strings */; }; + 84654C2018FE8EE300160F11 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C1F18FE8EE300160F11 /* main.m */; }; + 84654C2418FE8EE300160F11 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C2318FE8EE300160F11 /* AppDelegate.m */; }; + 84654C2618FE8EE300160F11 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84654C2518FE8EE300160F11 /* Images.xcassets */; }; + 84654C2D18FE8EE300160F11 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84654C2C18FE8EE300160F11 /* XCTest.framework */; }; + 84654C2E18FE8EE300160F11 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84654C1318FE8EE300160F11 /* Foundation.framework */; }; + 84654C2F18FE8EE300160F11 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84654C1718FE8EE300160F11 /* UIKit.framework */; }; + 84654C3718FE8EE300160F11 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84654C3518FE8EE300160F11 /* InfoPlist.strings */; }; + 84654C3918FE8EE300160F11 /* GraphKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C3818FE8EE300160F11 /* GraphKitTests.m */; }; + 84654C4C18FE909A00160F11 /* GKBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C4B18FE909A00160F11 /* GKBar.m */; }; + 84654C5118FE934800160F11 /* ExampleBarVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C4F18FE934800160F11 /* ExampleBarVC.m */; }; + 84654C5218FE934800160F11 /* ExampleBarVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84654C5018FE934800160F11 /* ExampleBarVC.xib */; }; + 84654C5518FEDCDF00160F11 /* GKBarGraph.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C5418FEDCDF00160F11 /* GKBarGraph.m */; }; + 84654C5918FF4C8300160F11 /* ExampleBarGraphVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 84654C5718FF4C8300160F11 /* ExampleBarGraphVC.m */; }; + 84654C5A18FF4C8300160F11 /* ExampleBarGraphVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84654C5818FF4C8300160F11 /* ExampleBarGraphVC.xib */; }; + 8472591E1904AA4F00819664 /* ExampleLineGraph.m in Sources */ = {isa = PBXBuildFile; fileRef = 8472591C1904AA4F00819664 /* ExampleLineGraph.m */; }; + 8472591F1904AA4F00819664 /* ExampleLineGraph.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8472591D1904AA4F00819664 /* ExampleLineGraph.xib */; }; + 847259231904ABE200819664 /* GKLineGraph.m in Sources */ = {isa = PBXBuildFile; fileRef = 847259221904ABE200819664 /* GKLineGraph.m */; }; + 847259291905C1D300819664 /* UIColor+GraphKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 847259281905C1D300819664 /* UIColor+GraphKit.m */; }; + 8472592F1905D63500819664 /* UIViewController+BButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8472592E1905D63500819664 /* UIViewController+BButton.m */; }; + 84F0E98E1902B30C00FA4810 /* ExampleListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 84F0E98C1902B30C00FA4810 /* ExampleListVC.m */; }; + 84F0E98F1902B30C00FA4810 /* ExampleListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84F0E98D1902B30C00FA4810 /* ExampleListVC.xib */; }; + 973F4746059343C9A462AA2D /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74E12B5B49644056930176BC /* libPods.a */; }; + FC41ADBA1AD436D600F7D9C0 /* GKStackedBarGraph.m in Sources */ = {isa = PBXBuildFile; fileRef = FC41ADB91AD436D600F7D9C0 /* GKStackedBarGraph.m */; }; + FC41ADBD1AD436EE00F7D9C0 /* GKStackedBar.m in Sources */ = {isa = PBXBuildFile; fileRef = FC41ADBC1AD436EE00F7D9C0 /* GKStackedBar.m */; }; + FC9B45D51AEE6B2A00688D83 /* ExampleStackedBarGraphVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC9B45D31AEE6B2A00688D83 /* ExampleStackedBarGraphVC.m */; }; + FC9B45D61AEE6B2A00688D83 /* ExampleStackedBarGraphVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC9B45D41AEE6B2A00688D83 /* ExampleStackedBarGraphVC.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 84654C3018FE8EE300160F11 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 84654C0818FE8EE200160F11 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 84654C0F18FE8EE200160F11; + remoteInfo = GraphKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 74E12B5B49644056930176BC /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 84654C1018FE8EE300160F11 /* GraphKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraphKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84654C1318FE8EE300160F11 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 84654C1518FE8EE300160F11 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 84654C1718FE8EE300160F11 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 84654C1B18FE8EE300160F11 /* GraphKit-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GraphKit-Info.plist"; sourceTree = ""; }; + 84654C1D18FE8EE300160F11 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 84654C1F18FE8EE300160F11 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 84654C2118FE8EE300160F11 /* GraphKit-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GraphKit-Prefix.pch"; sourceTree = ""; }; + 84654C2218FE8EE300160F11 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 84654C2318FE8EE300160F11 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 84654C2518FE8EE300160F11 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 84654C2B18FE8EE300160F11 /* GraphKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GraphKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 84654C2C18FE8EE300160F11 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 84654C3418FE8EE300160F11 /* GraphKitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GraphKitTests-Info.plist"; sourceTree = ""; }; + 84654C3618FE8EE300160F11 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 84654C3818FE8EE300160F11 /* GraphKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GraphKitTests.m; sourceTree = ""; }; + 84654C4618FE8F0600160F11 /* GraphKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphKit.h; sourceTree = ""; }; + 84654C4A18FE909A00160F11 /* GKBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GKBar.h; sourceTree = ""; }; + 84654C4B18FE909A00160F11 /* GKBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GKBar.m; sourceTree = ""; }; + 84654C4E18FE934800160F11 /* ExampleBarVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleBarVC.h; sourceTree = ""; }; + 84654C4F18FE934800160F11 /* ExampleBarVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleBarVC.m; sourceTree = ""; }; + 84654C5018FE934800160F11 /* ExampleBarVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExampleBarVC.xib; sourceTree = ""; }; + 84654C5318FEDCDF00160F11 /* GKBarGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GKBarGraph.h; sourceTree = ""; }; + 84654C5418FEDCDF00160F11 /* GKBarGraph.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GKBarGraph.m; sourceTree = ""; }; + 84654C5618FF4C8300160F11 /* ExampleBarGraphVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleBarGraphVC.h; sourceTree = ""; }; + 84654C5718FF4C8300160F11 /* ExampleBarGraphVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleBarGraphVC.m; sourceTree = ""; }; + 84654C5818FF4C8300160F11 /* ExampleBarGraphVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExampleBarGraphVC.xib; sourceTree = ""; }; + 8472591B1904AA4F00819664 /* ExampleLineGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleLineGraph.h; sourceTree = ""; }; + 8472591C1904AA4F00819664 /* ExampleLineGraph.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleLineGraph.m; sourceTree = ""; }; + 8472591D1904AA4F00819664 /* ExampleLineGraph.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExampleLineGraph.xib; sourceTree = ""; }; + 847259211904ABE200819664 /* GKLineGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GKLineGraph.h; sourceTree = ""; }; + 847259221904ABE200819664 /* GKLineGraph.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GKLineGraph.m; sourceTree = ""; }; + 847259271905C1D300819664 /* UIColor+GraphKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+GraphKit.h"; sourceTree = ""; }; + 847259281905C1D300819664 /* UIColor+GraphKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+GraphKit.m"; sourceTree = ""; }; + 8472592D1905D63500819664 /* UIViewController+BButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+BButton.h"; sourceTree = ""; }; + 8472592E1905D63500819664 /* UIViewController+BButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+BButton.m"; sourceTree = ""; }; + 84F0E98B1902B30C00FA4810 /* ExampleListVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleListVC.h; sourceTree = ""; }; + 84F0E98C1902B30C00FA4810 /* ExampleListVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleListVC.m; sourceTree = ""; }; + 84F0E98D1902B30C00FA4810 /* ExampleListVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExampleListVC.xib; sourceTree = ""; }; + 873AC9F69410844871F60371 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + 8AEF73567DD4B30E5A877C5C /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + FC41ADB81AD436D600F7D9C0 /* GKStackedBarGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GKStackedBarGraph.h; path = StackedBarGraph/GKStackedBarGraph.h; sourceTree = ""; }; + FC41ADB91AD436D600F7D9C0 /* GKStackedBarGraph.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GKStackedBarGraph.m; path = StackedBarGraph/GKStackedBarGraph.m; sourceTree = ""; }; + FC41ADBB1AD436EE00F7D9C0 /* GKStackedBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GKStackedBar.h; path = StackedBarGraph/GKStackedBar.h; sourceTree = ""; }; + FC41ADBC1AD436EE00F7D9C0 /* GKStackedBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GKStackedBar.m; path = StackedBarGraph/GKStackedBar.m; sourceTree = ""; }; + FC9B45D21AEE6B2A00688D83 /* ExampleStackedBarGraphVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleStackedBarGraphVC.h; sourceTree = ""; }; + FC9B45D31AEE6B2A00688D83 /* ExampleStackedBarGraphVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleStackedBarGraphVC.m; sourceTree = ""; }; + FC9B45D41AEE6B2A00688D83 /* ExampleStackedBarGraphVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExampleStackedBarGraphVC.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84654C0D18FE8EE200160F11 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84654C1618FE8EE300160F11 /* CoreGraphics.framework in Frameworks */, + 84654C1818FE8EE300160F11 /* UIKit.framework in Frameworks */, + 84654C1418FE8EE300160F11 /* Foundation.framework in Frameworks */, + 973F4746059343C9A462AA2D /* libPods.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84654C2818FE8EE300160F11 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84654C2D18FE8EE300160F11 /* XCTest.framework in Frameworks */, + 84654C2F18FE8EE300160F11 /* UIKit.framework in Frameworks */, + 84654C2E18FE8EE300160F11 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84654C0718FE8EE200160F11 = { + isa = PBXGroup; + children = ( + 84654C1918FE8EE300160F11 /* GraphKit */, + 84654C3218FE8EE300160F11 /* GraphKitTests */, + 84654C1218FE8EE300160F11 /* Frameworks */, + 84654C1118FE8EE300160F11 /* Products */, + D66EB86FC82255B51279B314 /* Pods */, + ); + sourceTree = ""; + }; + 84654C1118FE8EE300160F11 /* Products */ = { + isa = PBXGroup; + children = ( + 84654C1018FE8EE300160F11 /* GraphKit.app */, + 84654C2B18FE8EE300160F11 /* GraphKitTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 84654C1218FE8EE300160F11 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84654C1318FE8EE300160F11 /* Foundation.framework */, + 84654C1518FE8EE300160F11 /* CoreGraphics.framework */, + 84654C1718FE8EE300160F11 /* UIKit.framework */, + 84654C2C18FE8EE300160F11 /* XCTest.framework */, + 74E12B5B49644056930176BC /* libPods.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 84654C1918FE8EE300160F11 /* GraphKit */ = { + isa = PBXGroup; + children = ( + 84654C4D18FE932A00160F11 /* Example */, + 84654C4218FE8EF300160F11 /* Source */, + 84654C2218FE8EE300160F11 /* AppDelegate.h */, + 84654C2318FE8EE300160F11 /* AppDelegate.m */, + 84654C2518FE8EE300160F11 /* Images.xcassets */, + 84654C1A18FE8EE300160F11 /* Supporting Files */, + ); + path = GraphKit; + sourceTree = ""; + }; + 84654C1A18FE8EE300160F11 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 84654C1B18FE8EE300160F11 /* GraphKit-Info.plist */, + 84654C1C18FE8EE300160F11 /* InfoPlist.strings */, + 84654C1F18FE8EE300160F11 /* main.m */, + 84654C2118FE8EE300160F11 /* GraphKit-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 84654C3218FE8EE300160F11 /* GraphKitTests */ = { + isa = PBXGroup; + children = ( + 84654C3818FE8EE300160F11 /* GraphKitTests.m */, + 84654C3318FE8EE300160F11 /* Supporting Files */, + ); + path = GraphKitTests; + sourceTree = ""; + }; + 84654C3318FE8EE300160F11 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 84654C3418FE8EE300160F11 /* GraphKitTests-Info.plist */, + 84654C3518FE8EE300160F11 /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 84654C4218FE8EF300160F11 /* Source */ = { + isa = PBXGroup; + children = ( + 84654C4918FE907500160F11 /* BarGraph */, + 84654C4618FE8F0600160F11 /* GraphKit.h */, + 847259201904AB8F00819664 /* LineGraph */, + FC41ADB71AD436A800F7D9C0 /* StackedBarGraph */, + 847259271905C1D300819664 /* UIColor+GraphKit.h */, + 847259281905C1D300819664 /* UIColor+GraphKit.m */, + ); + name = Source; + path = ../../Source; + sourceTree = ""; + }; + 84654C4918FE907500160F11 /* BarGraph */ = { + isa = PBXGroup; + children = ( + 84654C4A18FE909A00160F11 /* GKBar.h */, + 84654C4B18FE909A00160F11 /* GKBar.m */, + 84654C5318FEDCDF00160F11 /* GKBarGraph.h */, + 84654C5418FEDCDF00160F11 /* GKBarGraph.m */, + ); + path = BarGraph; + sourceTree = ""; + }; + 84654C4D18FE932A00160F11 /* Example */ = { + isa = PBXGroup; + children = ( + 84654C4E18FE934800160F11 /* ExampleBarVC.h */, + 84654C4F18FE934800160F11 /* ExampleBarVC.m */, + 84654C5018FE934800160F11 /* ExampleBarVC.xib */, + 84654C5618FF4C8300160F11 /* ExampleBarGraphVC.h */, + 84654C5718FF4C8300160F11 /* ExampleBarGraphVC.m */, + 84654C5818FF4C8300160F11 /* ExampleBarGraphVC.xib */, + FC9B45D21AEE6B2A00688D83 /* ExampleStackedBarGraphVC.h */, + FC9B45D31AEE6B2A00688D83 /* ExampleStackedBarGraphVC.m */, + FC9B45D41AEE6B2A00688D83 /* ExampleStackedBarGraphVC.xib */, + 8472591B1904AA4F00819664 /* ExampleLineGraph.h */, + 8472591C1904AA4F00819664 /* ExampleLineGraph.m */, + 8472591D1904AA4F00819664 /* ExampleLineGraph.xib */, + 84F0E98B1902B30C00FA4810 /* ExampleListVC.h */, + 84F0E98C1902B30C00FA4810 /* ExampleListVC.m */, + 84F0E98D1902B30C00FA4810 /* ExampleListVC.xib */, + 8472592D1905D63500819664 /* UIViewController+BButton.h */, + 8472592E1905D63500819664 /* UIViewController+BButton.m */, + ); + path = Example; + sourceTree = SOURCE_ROOT; + }; + 847259201904AB8F00819664 /* LineGraph */ = { + isa = PBXGroup; + children = ( + 847259211904ABE200819664 /* GKLineGraph.h */, + 847259221904ABE200819664 /* GKLineGraph.m */, + ); + path = LineGraph; + sourceTree = ""; + }; + D66EB86FC82255B51279B314 /* Pods */ = { + isa = PBXGroup; + children = ( + 8AEF73567DD4B30E5A877C5C /* Pods.debug.xcconfig */, + 873AC9F69410844871F60371 /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + FC41ADB71AD436A800F7D9C0 /* StackedBarGraph */ = { + isa = PBXGroup; + children = ( + FC41ADBB1AD436EE00F7D9C0 /* GKStackedBar.h */, + FC41ADBC1AD436EE00F7D9C0 /* GKStackedBar.m */, + FC41ADB81AD436D600F7D9C0 /* GKStackedBarGraph.h */, + FC41ADB91AD436D600F7D9C0 /* GKStackedBarGraph.m */, + ); + name = StackedBarGraph; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84654C0F18FE8EE200160F11 /* GraphKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84654C3C18FE8EE300160F11 /* Build configuration list for PBXNativeTarget "GraphKit" */; + buildPhases = ( + 83175F7BAC184C238C8A7ED0 /* Check Pods Manifest.lock */, + 84654C0C18FE8EE200160F11 /* Sources */, + 84654C0D18FE8EE200160F11 /* Frameworks */, + 84654C0E18FE8EE200160F11 /* Resources */, + D08870F64023490D9D34D82D /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GraphKit; + productName = GraphKit; + productReference = 84654C1018FE8EE300160F11 /* GraphKit.app */; + productType = "com.apple.product-type.application"; + }; + 84654C2A18FE8EE300160F11 /* GraphKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84654C3F18FE8EE300160F11 /* Build configuration list for PBXNativeTarget "GraphKitTests" */; + buildPhases = ( + 84654C2718FE8EE300160F11 /* Sources */, + 84654C2818FE8EE300160F11 /* Frameworks */, + 84654C2918FE8EE300160F11 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 84654C3118FE8EE300160F11 /* PBXTargetDependency */, + ); + name = GraphKitTests; + productName = GraphKitTests; + productReference = 84654C2B18FE8EE300160F11 /* GraphKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84654C0818FE8EE200160F11 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = "Michal Konturek"; + TargetAttributes = { + 84654C2A18FE8EE300160F11 = { + TestTargetID = 84654C0F18FE8EE200160F11; + }; + }; + }; + buildConfigurationList = 84654C0B18FE8EE200160F11 /* Build configuration list for PBXProject "GraphKit" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 84654C0718FE8EE200160F11; + productRefGroup = 84654C1118FE8EE300160F11 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84654C0F18FE8EE200160F11 /* GraphKit */, + 84654C2A18FE8EE300160F11 /* GraphKitTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84654C0E18FE8EE200160F11 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84654C1E18FE8EE300160F11 /* InfoPlist.strings in Resources */, + 84654C2618FE8EE300160F11 /* Images.xcassets in Resources */, + 84654C5A18FF4C8300160F11 /* ExampleBarGraphVC.xib in Resources */, + 84F0E98F1902B30C00FA4810 /* ExampleListVC.xib in Resources */, + FC9B45D61AEE6B2A00688D83 /* ExampleStackedBarGraphVC.xib in Resources */, + 84654C5218FE934800160F11 /* ExampleBarVC.xib in Resources */, + 8472591F1904AA4F00819664 /* ExampleLineGraph.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84654C2918FE8EE300160F11 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84654C3718FE8EE300160F11 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 83175F7BAC184C238C8A7ED0 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + D08870F64023490D9D34D82D /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84654C0C18FE8EE200160F11 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 847259231904ABE200819664 /* GKLineGraph.m in Sources */, + 8472592F1905D63500819664 /* UIViewController+BButton.m in Sources */, + 84654C5518FEDCDF00160F11 /* GKBarGraph.m in Sources */, + 84654C2418FE8EE300160F11 /* AppDelegate.m in Sources */, + 847259291905C1D300819664 /* UIColor+GraphKit.m in Sources */, + 84654C5918FF4C8300160F11 /* ExampleBarGraphVC.m in Sources */, + 8472591E1904AA4F00819664 /* ExampleLineGraph.m in Sources */, + FC41ADBD1AD436EE00F7D9C0 /* GKStackedBar.m in Sources */, + FC9B45D51AEE6B2A00688D83 /* ExampleStackedBarGraphVC.m in Sources */, + 84654C4C18FE909A00160F11 /* GKBar.m in Sources */, + 84654C2018FE8EE300160F11 /* main.m in Sources */, + 84F0E98E1902B30C00FA4810 /* ExampleListVC.m in Sources */, + FC41ADBA1AD436D600F7D9C0 /* GKStackedBarGraph.m in Sources */, + 84654C5118FE934800160F11 /* ExampleBarVC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84654C2718FE8EE300160F11 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84654C3918FE8EE300160F11 /* GraphKitTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 84654C3118FE8EE300160F11 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 84654C0F18FE8EE200160F11 /* GraphKit */; + targetProxy = 84654C3018FE8EE300160F11 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 84654C1C18FE8EE300160F11 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 84654C1D18FE8EE300160F11 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 84654C3518FE8EE300160F11 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 84654C3618FE8EE300160F11 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84654C3A18FE8EE300160F11 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/**"; + }; + name = Debug; + }; + 84654C3B18FE8EE300160F11 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + SDKROOT = iphoneos; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/**"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 84654C3D18FE8EE300160F11 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8AEF73567DD4B30E5A877C5C /* Pods.debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "GraphKit/GraphKit-Prefix.pch"; + INFOPLIST_FILE = "GraphKit/GraphKit-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/**"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84654C3E18FE8EE300160F11 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 873AC9F69410844871F60371 /* Pods.release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "GraphKit/GraphKit-Prefix.pch"; + INFOPLIST_FILE = "GraphKit/GraphKit-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/**"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 84654C4018FE8EE300160F11 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/GraphKit.app/GraphKit"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "GraphKit/GraphKit-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "GraphKitTests/GraphKitTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 84654C4118FE8EE300160F11 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/GraphKit.app/GraphKit"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "GraphKit/GraphKit-Prefix.pch"; + INFOPLIST_FILE = "GraphKitTests/GraphKitTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84654C0B18FE8EE200160F11 /* Build configuration list for PBXProject "GraphKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84654C3A18FE8EE300160F11 /* Debug */, + 84654C3B18FE8EE300160F11 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84654C3C18FE8EE300160F11 /* Build configuration list for PBXNativeTarget "GraphKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84654C3D18FE8EE300160F11 /* Debug */, + 84654C3E18FE8EE300160F11 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84654C3F18FE8EE300160F11 /* Build configuration list for PBXNativeTarget "GraphKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84654C4018FE8EE300160F11 /* Debug */, + 84654C4118FE8EE300160F11 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84654C0818FE8EE200160F11 /* Project object */; +} diff --git a/Source/GraphKit.h b/Source/GraphKit.h index 6387f9a..fa29d3c 100644 --- a/Source/GraphKit.h +++ b/Source/GraphKit.h @@ -28,6 +28,8 @@ #import "GKBar.h" #import "GKBarGraph.h" +#import "GKStackedBar.h" +#import "GKStackedBarGraph.h" #import "GKLineGraph.h" #import "UIColor+GraphKit.h" \ No newline at end of file diff --git a/Source/StackedBarGraph/GKStackedBar.h b/Source/StackedBarGraph/GKStackedBar.h new file mode 100644 index 0000000..02c91d0 --- /dev/null +++ b/Source/StackedBarGraph/GKStackedBar.h @@ -0,0 +1,45 @@ +// +// GKStackedBar.h +// GraphKit +// +// Copyright (c) 2014 Michal Konturek +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#import + +@interface GKStackedBar : UIView + ++ (instancetype)create; ++ (instancetype)createWithFrame:(CGRect)frame; + +@property (nonatomic, assign) BOOL animated; +@property (nonatomic, assign) CFTimeInterval animationDuration; + +@property (nonatomic, strong) NSMutableArray *percentages; + +@property (nonatomic, assign) CGFloat cornerRadius; +@property (nonatomic, strong) NSArray *foregroundColors; + +- (void)setPercentages:(NSArray *)percentages animated:(BOOL)animated; + +- (void)reset; + +@end diff --git a/Source/StackedBarGraph/GKStackedBar.m b/Source/StackedBarGraph/GKStackedBar.m new file mode 100644 index 0000000..b922cbc --- /dev/null +++ b/Source/StackedBarGraph/GKStackedBar.m @@ -0,0 +1,197 @@ +// +// GKStackedBar.m +// GraphKit +// +// Copyright (c) 2014 Michal Konturek +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#import "GKStackedBar.h" + +#import + +#import "UIColor+GraphKit.h" + +static CFTimeInterval kDefaultAnimationDuration = 1.0; + +@interface GKStackedBar () + +@property (atomic, assign) BOOL animationInProgress; + +@end + +@implementation GKStackedBar + ++ (instancetype)create { + CGRect defaultRect = CGRectMake(0, 0, 30, 200); + return [self createWithFrame:defaultRect]; +} + ++ (instancetype)createWithFrame:(CGRect)frame { + return [[self alloc] initWithFrame:frame]; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self _init]; + } + return self; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self _init]; + } + return self; +} + +- (void)_init { + self.animated = YES; + self.animationDuration = kDefaultAnimationDuration; + self.clipsToBounds = YES; + self.cornerRadius = 2.0; + self.foregroundColors = @[[UIColor gk_alizarinColor], [UIColor gk_emerlandColor], [UIColor gk_peterRiverColor]]; + self.backgroundColor = [UIColor gk_silverColor]; + _percentages = [NSMutableArray array]; +} + +- (void)setCornerRadius:(CGFloat)cornerRadius { + _cornerRadius = cornerRadius; + self.layer.cornerRadius = cornerRadius; +} + +- (void)setPercentages:(NSArray *)percentages animated:(BOOL)animated { + self.animated = animated; + self.percentages = [percentages mutableCopy]; + self.animated = YES; +} + +- (void)setPercentages:(NSArray *)percentages { + if (_percentages.count < percentages.count) { + for (int i = 0; i < percentages.count; i++) { + [_percentages addObject:@0]; + } + } + + __block CGFloat sum = 0; + [percentages enumerateObjectsUsingBlock:^(NSNumber *item, NSUInteger idx, BOOL *stop) { + CGFloat percentage = [item floatValue]; + if (percentage == [_percentages[idx] floatValue]) return; + if (percentage > 100) percentage = 100; + if (percentage < 0) percentage = 0; + if (self.animationInProgress) return; + + [self _progressBarFrom:sum value:percentage atIndex:idx]; + sum += percentage; + }]; + + _percentages = [percentages mutableCopy]; +} + +- (void)_progressBarFrom:(CGFloat)from value:(CGFloat)value atIndex:(NSInteger)index { + CGFloat fromConverted = (from / 100); + CGFloat converted = (value / 100); + UIBezierPath *path = [self _bezierPathWithStart:fromConverted value:converted atIndex:index]; + + CAShapeLayer *layer = [self _layerWithPath:path atIndex:index]; + if ([_percentages[index] floatValue] > value) layer.strokeColor = [self.backgroundColor CGColor]; + + [self.layer addSublayer:layer]; + + if (self.animated) { + id animation = [self _animationWithKeyPath:@"strokeEnd"]; + [layer addAnimation:animation forKey:@"strokeEndAnimation"]; + } +} + +- (UIBezierPath *)_bezierPathWithStart:(CGFloat)start value:(CGFloat)value atIndex:(NSInteger)index { + UIBezierPath *path = [UIBezierPath bezierPath]; + CGFloat startX = (self.frame.size.width / 2); + CGFloat previousStackEndY = self.frame.size.height * start; + CGFloat startY = (self.frame.size.height * (1 - ([_percentages[index] floatValue] / 100)) - previousStackEndY); + CGFloat endY = (self.frame.size.height * (1 - value) - previousStackEndY); + [path moveToPoint:CGPointMake(startX, startY)]; + [path addLineToPoint:CGPointMake(startX, endY)]; + return path; +} + +- (CAShapeLayer *)_layerWithPath:(UIBezierPath *)path atIndex:(NSInteger)index { + CAShapeLayer *item = [CAShapeLayer layer]; + item.fillColor = [[UIColor blackColor] CGColor]; + item.lineCap = kCALineCapButt; + item.lineWidth = self.frame.size.width; + item.path = path.CGPath; + item.strokeColor = [self.foregroundColors[index % (self.foregroundColors.count)] CGColor]; + item.strokeEnd = 1.0; + return item; +} + +- (CABasicAnimation *)_animationWithKeyPath:(NSString *)keyPath { + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:keyPath]; + animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + animation.duration = self.animationDuration; + animation.fromValue = @(0); + animation.toValue = @(1); + animation.delegate = self; + return animation; +} + +- (void)animationDidStart:(CAAnimation *)anim { + self.animationInProgress = YES; +} + +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag { + self.animationInProgress = NO; +} + +- (void)setForegroundColors:(NSArray *)foregroundColors { + _foregroundColors = foregroundColors; + + self.layer.sublayers = nil; + NSMutableArray *temp = [_percentages copy]; + [self setPercentages:[self zeroes] animated:NO]; + [self setPercentages:temp animated:NO]; +} + +- (void)reset { + [UIView animateWithDuration:0.5 + delay:0.0 + options:UIViewAnimationOptionCurveEaseOut + animations:^{ + for (CAShapeLayer *item in self.layer.sublayers) { + item.strokeColor = [[UIColor clearColor] CGColor]; + } + } completion:^(BOOL finished) { + self.layer.sublayers = nil; + }]; + self.percentages = [self zeroes]; +} + +- (NSMutableArray *)zeroes { + NSMutableArray *zeros = [NSMutableArray array]; + for (int i = 0; i < self.percentages.count; i++) { + [zeros addObject:@0]; + } + return zeros; +} + +@end diff --git a/Source/StackedBarGraph/GKStackedBarGraph.h b/Source/StackedBarGraph/GKStackedBarGraph.h new file mode 100644 index 0000000..68822c2 --- /dev/null +++ b/Source/StackedBarGraph/GKStackedBarGraph.h @@ -0,0 +1,64 @@ +// +// GKStackedBarGraph.h +// GraphKit +// +// Copyright (c) 2014 Michal Konturek +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + + +#import + +@protocol GKStackedBarGraphDataSource; + +@interface GKStackedBarGraph : UIView + +@property (nonatomic, assign) BOOL animated; +@property (nonatomic, assign) CFTimeInterval animationDuration; + +@property (nonatomic, weak) IBOutlet id dataSource; + +@property (nonatomic, strong) NSArray *bars; +@property (nonatomic, strong) NSArray *labels; +@property (nonatomic, strong) NSArray *barColors; + +@property (nonatomic, assign) CGFloat barHeight; +@property (nonatomic, assign) CGFloat barWidth; +@property (nonatomic, assign) CGFloat marginBar; + +- (void)draw; +- (void)reset; + +@end + +@protocol GKStackedBarGraphDataSource + +- (NSInteger)numberOfBars; +- (NSInteger)numberOfStacks; +- (NSNumber *)valueForBarAtIndex:(NSInteger)index stack:(NSInteger)stack; + +@optional +- (UIColor *)colorForBarAtIndex:(NSInteger)index stack:(NSInteger)stack; +- (UIColor *)colorForBarBackgroundAtIndex:(NSInteger)index; +- (CFTimeInterval)animationDurationForBarAtIndex:(NSInteger)index; + +- (NSString *)titleForBarAtIndex:(NSInteger)index; + +@end diff --git a/Source/StackedBarGraph/GKStackedBarGraph.m b/Source/StackedBarGraph/GKStackedBarGraph.m new file mode 100644 index 0000000..251e59e --- /dev/null +++ b/Source/StackedBarGraph/GKStackedBarGraph.m @@ -0,0 +1,241 @@ +// +// GKStackedBarGraph.m +// GraphKit +// +// Copyright (c) 2014 Michal Konturek +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#import "GKStackedBarGraph.h" + +#import +#import + +#import "GKStackedBar.h" + +static CGFloat kDefaultBarHeight = 140; +static CGFloat kDefaultBarWidth = 22; +static CGFloat kDefaultBarMargin = 20; +static CGFloat kDefaultLabelWidth = 40; +static CGFloat kDefaultLabelHeight = 15; + +static CGFloat kDefaultAnimationDuration = 2.0; + +@implementation GKStackedBarGraph + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self _init]; + } + return self; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self _init]; + self.backgroundColor = [UIColor clearColor]; + } + return self; +} + +- (void)_init { + self.animationDuration = kDefaultAnimationDuration; + self.barHeight = kDefaultBarHeight; + self.barWidth = kDefaultBarWidth; + self.marginBar = kDefaultBarMargin; +} + +- (void)setAnimated:(BOOL)animated { + _animated = animated; + [self.bars mk_each:^(GKStackedBar *item) { + item.animated = animated; + }]; +} + +- (void)setAnimationDuration:(CFTimeInterval)animationDuration { + _animationDuration = animationDuration; + [self.bars mk_each:^(GKStackedBar *item) { + item.animationDuration = animationDuration; + }]; +} + +- (void)setBarColors:(NSArray *)barColors { + _barColors = barColors; + [self.bars mk_each:^(GKStackedBar *item) { + item.foregroundColors = barColors; + }]; +} + +- (void)draw { + [self _construct]; + [self _drawBars]; +} + +- (void)_construct { + NSAssert(self.dataSource, @"GKStackedBarGraph : No data source is assigned."); + + if ([self _hasBars]) [self _removeBars]; + if ([self _hasLabels]) [self _removeLabels]; + + [self _constructBars]; + [self _constructLabels]; + + [self _positionBars]; + [self _positionLabels]; +} + +- (BOOL)_hasBars { + return ![self.bars mk_isEmpty]; +} + +- (void)_constructBars { + NSInteger barCount = [self.dataSource numberOfBars]; + id bars = [NSMutableArray arrayWithCapacity:barCount]; + for (NSInteger idx = 0; idx < barCount; idx++) { + GKStackedBar *item = [GKStackedBar create]; + if ([self barColors]) item.foregroundColors = [self barColors]; + [bars addObject:item]; + } + self.bars = bars; +} + +- (void)_removeBars { + [self.bars mk_each:^(GKStackedBar *item) { + [item removeFromSuperview]; + }]; +} + +- (void)_positionBars { + CGFloat y = [self _barStartY]; + + __block CGFloat x = [self _barStartX]; + [self.bars mk_each:^(GKStackedBar *item) { + item.frame = CGRectMake(x, y, _barWidth, _barHeight); + [self addSubview:item]; + x += [self _barSpace]; + }]; +} + +- (CGFloat)_barStartX { + CGFloat result = self.width; + CGFloat item = [self _barSpace]; + NSInteger count = [self.dataSource numberOfBars]; + + result = result - (item * count) + self.marginBar; + result = (result / 2); + return result; +} + +- (CGFloat)_barSpace { + return (self.barWidth + self.marginBar); +} + +- (CGFloat)_barStartY { + return (self.height - self.barHeight); +} + +- (BOOL)_hasLabels { + return ![self.labels mk_isEmpty]; +} + +- (void)_constructLabels { + + NSInteger count = [self.dataSource numberOfBars]; + id items = [NSMutableArray arrayWithCapacity:count]; + for (NSInteger idx = 0; idx < count; idx++) { + + CGRect frame = CGRectMake(0, 0, kDefaultLabelWidth, kDefaultLabelHeight); + UILabel *item = [[UILabel alloc] initWithFrame:frame]; + item.textAlignment = NSTextAlignmentCenter; + item.font = [UIFont boldSystemFontOfSize:13]; + item.textColor = [UIColor lightGrayColor]; + item.text = [self.dataSource titleForBarAtIndex:idx]; + + [items addObject:item]; + } + self.labels = items; +} + +- (void)_removeLabels { + [self.labels mk_each:^(id item) { + [item removeFromSuperview]; + }]; +} + +- (void)_positionLabels { + + __block NSInteger idx = 0; + [self.bars mk_each:^(GKStackedBar *bar) { + + CGFloat labelWidth = kDefaultLabelWidth; + CGFloat labelHeight = kDefaultLabelHeight; + CGFloat startX = bar.x - ((labelWidth - self.barWidth) / 2); + CGFloat startY = (self.height - labelHeight); + + UILabel *label = [self.labels objectAtIndex:idx]; + label.x = startX; + label.y = startY; + + [self addSubview:label]; + + bar.y -= labelHeight + 5; + idx++; + }]; +} + +- (void)_drawBars { + __block NSInteger idx = 0; + id source = self.dataSource; + [self.bars mk_each:^(GKStackedBar *item) { + + if ([source respondsToSelector:@selector(animationDurationForBarAtIndex:)]) { + item.animationDuration = [source animationDurationForBarAtIndex:idx]; + } + + if ([source respondsToSelector:@selector(colorForBarAtIndex:stack:)]) { + NSMutableArray *colors = [NSMutableArray array]; + for (int i = 0; i < [self.dataSource numberOfStacks]; i++) { + [colors addObject:[source colorForBarAtIndex:idx stack:i]]; + } + item.foregroundColors = colors; + } + + if ([source respondsToSelector:@selector(colorForBarBackgroundAtIndex:)]) { + item.backgroundColor = [source colorForBarBackgroundAtIndex:idx]; + } + + NSMutableArray *percentages = [NSMutableArray array]; + for (int i = 0; i < [self.dataSource numberOfStacks]; i++) { + [percentages addObject:[source valueForBarAtIndex:idx stack:i]]; + } + item.percentages = percentages; + idx++; + }]; +} + +- (void)reset { + [self.bars mk_each:^(GKStackedBar *item) { + [item reset]; + }]; +} + +@end