├── .swift-version ├── Pod ├── Assets │ └── .gitkeep ├── Classes │ ├── .gitkeep │ ├── NSCalendar+Timepiece.swift │ ├── String+Timepiece.swift │ ├── NSDateComponents+Timepiece.swift │ ├── Int+Timepiece.swift │ ├── Duration.swift │ ├── NSDate+BigBoard.swift │ ├── BigBoardSearchResultStock.swift │ ├── BigBoardRSSFeed.swift │ ├── NSTimeInterval+Timepiece.swift │ ├── BigBoardHistoricalData.swift │ ├── NSCalendarUnit+Timepiece.swift │ ├── BigBoardRSSFeedItem.swift │ ├── BigBoardChartDataModulePoint.swift │ ├── BigBoardChartDataModule.swift │ ├── UIImageView+BigBoard.swift │ └── BigBoardError.swift ├── NSCalendar+Timepiece.swift ├── String+Timepiece.swift ├── NSDateComponents+Timepiece.swift ├── Int+Timepiece.swift ├── Duration.swift ├── NSTimeInterval+Timepiece.swift └── NSCalendarUnit+Timepiece.swift ├── .github └── FUNDING.yml ├── _Pods.xcodeproj ├── Assets └── bigboard.png ├── Example ├── Pods │ ├── Target Support Files │ │ ├── Alamofire │ │ │ ├── Alamofire-prefix.pch │ │ │ ├── Alamofire.modulemap │ │ │ ├── Alamofire-dummy.m │ │ │ ├── Alamofire-umbrella.h │ │ │ ├── Alamofire.xcconfig │ │ │ └── Info.plist │ │ ├── BigBoard │ │ │ ├── BigBoard-prefix.pch │ │ │ ├── BigBoard.modulemap │ │ │ ├── BigBoard-dummy.m │ │ │ ├── BigBoard-umbrella.h │ │ │ ├── BigBoard.xcconfig │ │ │ └── Info.plist │ │ ├── SnapKit │ │ │ ├── SnapKit-prefix.pch │ │ │ ├── SnapKit.modulemap │ │ │ ├── SnapKit-dummy.m │ │ │ ├── SnapKit-umbrella.h │ │ │ ├── SnapKit.xcconfig │ │ │ └── Info.plist │ │ ├── AlamofireImage │ │ │ ├── AlamofireImage-prefix.pch │ │ │ ├── AlamofireImage.modulemap │ │ │ ├── AlamofireImage-dummy.m │ │ │ ├── AlamofireImage-umbrella.h │ │ │ ├── AlamofireImage.xcconfig │ │ │ └── Info.plist │ │ ├── ObjectMapper │ │ │ ├── ObjectMapper-prefix.pch │ │ │ ├── ObjectMapper.modulemap │ │ │ ├── ObjectMapper-dummy.m │ │ │ ├── ObjectMapper-umbrella.h │ │ │ ├── ObjectMapper.xcconfig │ │ │ └── Info.plist │ │ ├── ChameleonFramework │ │ │ ├── ChameleonFramework-prefix.pch │ │ │ ├── ChameleonFramework.modulemap │ │ │ ├── ChameleonFramework-dummy.m │ │ │ ├── ChameleonFramework.xcconfig │ │ │ ├── ChameleonFramework-umbrella.h │ │ │ └── Info.plist │ │ ├── AlamofireObjectMapper │ │ │ ├── AlamofireObjectMapper-prefix.pch │ │ │ ├── AlamofireObjectMapper.modulemap │ │ │ ├── AlamofireObjectMapper-dummy.m │ │ │ ├── AlamofireObjectMapper-umbrella.h │ │ │ ├── AlamofireObjectMapper.xcconfig │ │ │ └── Info.plist │ │ ├── Pods-BigBoardTests │ │ │ ├── Pods-BigBoardTests.modulemap │ │ │ ├── Pods-BigBoardTests-dummy.m │ │ │ ├── Pods-BigBoardTests-umbrella.h │ │ │ ├── Info.plist │ │ │ ├── Pods-BigBoardTests.debug.xcconfig │ │ │ └── Pods-BigBoardTests.release.xcconfig │ │ └── Pods-BigBoard_Example │ │ │ ├── Pods-BigBoard_Example.modulemap │ │ │ ├── Pods-BigBoard_Example-dummy.m │ │ │ ├── Pods-BigBoard_Example-umbrella.h │ │ │ ├── Info.plist │ │ │ ├── Pods-BigBoard_Example.debug.xcconfig │ │ │ └── Pods-BigBoard_Example.release.xcconfig │ ├── ChameleonFramework │ │ ├── Pod │ │ │ └── Classes │ │ │ │ └── Objective-C │ │ │ │ ├── ChameleonConstants.m │ │ │ │ ├── UILabel+Chameleon.h │ │ │ │ ├── UIButton+Chameleon.h │ │ │ │ ├── UIView+ChameleonPrivate.h │ │ │ │ ├── UILabel+Chameleon.m │ │ │ │ ├── UIAppearance+Swift.h │ │ │ │ ├── ChameleonConstants.h │ │ │ │ ├── UIImage+ChameleonPrivate.h │ │ │ │ ├── UIButton+Chameleon.m │ │ │ │ ├── UINavigationController+Chameleon.h │ │ │ │ ├── UIColor+ChameleonPrivate.h │ │ │ │ ├── Chameleon.h │ │ │ │ ├── ChameleonEnums.h │ │ │ │ ├── UIAppearance+Swift.m │ │ │ │ ├── UIView+ChameleonPrivate.m │ │ │ │ ├── UIViewController+Chameleon.h │ │ │ │ ├── Chameleon_.h │ │ │ │ └── UIImage+ChameleonPrivate.m │ │ └── LICENSE.md │ ├── ObjectMapper │ │ ├── LICENSE │ │ └── ObjectMapper │ │ │ └── Transforms │ │ │ ├── DictionaryTransform.swift │ │ │ ├── TransformType.swift │ │ │ ├── ISO8601DateTransform.swift │ │ │ ├── CustomDateFormatTransform.swift │ │ │ ├── EnumTransform.swift │ │ │ ├── DataTransform.swift │ │ │ ├── TransformOf.swift │ │ │ ├── DateFormatterTransform.swift │ │ │ ├── DateTransform.swift │ │ │ ├── NSDecimalNumberTransform.swift │ │ │ └── URLTransform.swift │ ├── Local Podspecs │ │ ├── BigBoard.podspec.json │ │ └── ChameleonFramework.podspec.json │ ├── SnapKit │ │ ├── LICENSE │ │ └── Source │ │ │ ├── ConstraintView.swift │ │ │ ├── ConstraintInsets.swift │ │ │ ├── ConstraintLayoutGuide.swift │ │ │ ├── UILayoutGuide+Extensions.swift │ │ │ ├── ConstraintLayoutSupport.swift │ │ │ ├── UILayoutSupport+Extensions.swift │ │ │ ├── ConstraintConfig.swift │ │ │ ├── ConstraintLayoutGuideDSL.swift │ │ │ ├── ConstraintRelation.swift │ │ │ ├── ConstraintMakerFinalizable.swift │ │ │ ├── ConstraintRelatableTarget.swift │ │ │ ├── LayoutConstraint.swift │ │ │ ├── ConstraintLayoutSupportDSL.swift │ │ │ ├── ConstraintItem.swift │ │ │ ├── ConstraintMakerEditable.swift │ │ │ ├── ConstraintPriorityTarget.swift │ │ │ ├── ConstraintMultiplierTarget.swift │ │ │ ├── ConstraintOffsetTarget.swift │ │ │ ├── ConstraintMakerPriortizable.swift │ │ │ ├── ConstraintDescription.swift │ │ │ └── ConstraintInsetTarget.swift │ ├── Alamofire │ │ ├── LICENSE │ │ └── Source │ │ │ ├── DispatchQueue+Alamofire.swift │ │ │ └── Notifications.swift │ ├── AlamofireImage │ │ ├── LICENSE │ │ └── Source │ │ │ ├── Image.swift │ │ │ └── AFIError.swift │ ├── AlamofireObjectMapper │ │ └── LICENSE │ └── Manifest.lock ├── BigBoard.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── BigBoard.xcworkspace │ └── contents.xcworkspacedata ├── Podfile ├── BigBoardTests │ └── Info.plist ├── BigBoard │ ├── ExampleAddStockModel.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ExampleStockDetailsModel.swift │ ├── Info.plist │ ├── ExampleModel.swift │ ├── ExampleAddStockViewController.swift │ ├── ExampleStockDetailsViewController.swift │ ├── ExampleViewController.swift │ ├── AppDelegate.swift │ ├── ExampleView.swift │ ├── ExampleStockDetailsView.swift │ └── Base.lproj │ │ └── LaunchScreen.xib ├── Tests │ └── BigBoardTestsHelper.swift └── Podfile.lock ├── .gitignore ├── LICENSE ├── .travis.yml └── BigBoard.podspec /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [daltron] 2 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /Assets/bigboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daltron/BigBoard/HEAD/Assets/bigboard.png -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BigBoard/BigBoard-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireImage/AlamofireImage-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ObjectMapper/ObjectMapper-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ChameleonFramework/ChameleonFramework-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireObjectMapper/AlamofireObjectMapper-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SnapKit { 2 | umbrella header "SnapKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BigBoard/BigBoard.modulemap: -------------------------------------------------------------------------------- 1 | framework module BigBoard { 2 | umbrella header "BigBoard-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap: -------------------------------------------------------------------------------- 1 | framework module Alamofire { 2 | umbrella header "Alamofire-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Alamofire : NSObject 3 | @end 4 | @implementation PodsDummy_Alamofire 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BigBoard/BigBoard-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_BigBoard : NSObject 3 | @end 4 | @implementation PodsDummy_BigBoard 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ObjectMapper/ObjectMapper.modulemap: -------------------------------------------------------------------------------- 1 | framework module ObjectMapper { 2 | umbrella header "ObjectMapper-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireImage/AlamofireImage.modulemap: -------------------------------------------------------------------------------- 1 | framework module AlamofireImage { 2 | umbrella header "AlamofireImage-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ObjectMapper/ObjectMapper-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ObjectMapper : NSObject 3 | @end 4 | @implementation PodsDummy_ObjectMapper 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireImage/AlamofireImage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AlamofireImage : NSObject 3 | @end 4 | @implementation PodsDummy_AlamofireImage 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double SnapKitVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double AlamofireVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BigBoard/BigBoard-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double BigBoardVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char BigBoardVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ChameleonFramework/ChameleonFramework.modulemap: -------------------------------------------------------------------------------- 1 | framework module ChameleonFramework { 2 | umbrella header "ChameleonFramework-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoardTests/Pods-BigBoardTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BigBoardTests { 2 | umbrella header "Pods-BigBoardTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireObjectMapper/AlamofireObjectMapper.modulemap: -------------------------------------------------------------------------------- 1 | framework module AlamofireObjectMapper { 2 | umbrella header "AlamofireObjectMapper-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ChameleonFramework/ChameleonFramework-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ChameleonFramework : NSObject 3 | @end 4 | @implementation PodsDummy_ChameleonFramework 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ObjectMapper/ObjectMapper-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double ObjectMapperVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char ObjectMapperVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoardTests/Pods-BigBoardTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BigBoardTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BigBoardTests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoard_Example/Pods-BigBoard_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BigBoard_Example { 2 | umbrella header "Pods-BigBoard_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireImage/AlamofireImage-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double AlamofireImageVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char AlamofireImageVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/BigBoard.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireObjectMapper/AlamofireObjectMapper-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AlamofireObjectMapper : NSObject 3 | @end 4 | @implementation PodsDummy_AlamofireObjectMapper 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoard_Example/Pods-BigBoard_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BigBoard_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BigBoard_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoardTests/Pods-BigBoardTests-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_BigBoardTestsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_BigBoardTestsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireObjectMapper/AlamofireObjectMapper-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double AlamofireObjectMapperVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char AlamofireObjectMapperVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoard_Example/Pods-BigBoard_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_BigBoard_ExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_BigBoard_ExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/BigBoard.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/ChameleonConstants.m: -------------------------------------------------------------------------------- 1 | // 2 | // Constants.m 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import "ChameleonConstants.h" 10 | 11 | const UIStatusBarStyle UIStatusBarStyleContrast = 100; 12 | 13 | @implementation ChameleonConstants 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '9.0' 3 | use_frameworks! 4 | 5 | target 'BigBoard_Example' do 6 | pod 'BigBoard', :path => '../' 7 | pod 'SnapKit', '~> 3.0' 8 | pod 'ChameleonFramework/Swift', :git=> 'https://github.com/ViccAlexander/Chameleon', :branch => 'swift3' 9 | end 10 | 11 | target 'BigBoardTests' do 12 | pod 'BigBoard', :path => '../' 13 | end 14 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UILabel+Chameleon.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+Chameleon.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 9/20/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UILabel (Chameleon) 12 | 13 | - (void)setSubstituteFontName:(NSString *)name UI_APPEARANCE_SELECTOR; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIButton+Chameleon.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Chameleon.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 9/20/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIButton (Chameleon) 12 | 13 | - (void)setSubstituteFontName:(NSString *)name UI_APPEARANCE_SELECTOR; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pod/NSCalendar+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSCalendar+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 25/04/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | 12 | extension Calendar { 13 | func dateByAdding(duration: Duration, to date: Date) -> Date? { 14 | return self.date(byAdding: DateComponents(duration), to: date) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Pod/Classes/NSCalendar+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSCalendar+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 25/04/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | 12 | extension Calendar { 13 | func dateByAdding(duration: Duration, to date: Date) -> Date? { 14 | return self.date(byAdding: DateComponents(duration), to: date) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIView+ChameleonPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ChameleonPrivate.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (ChameleonPrivate) 12 | 13 | - (BOOL)isTopViewInWindow; 14 | - (UIView *)findTopMostViewForPoint:(CGPoint)point; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UILabel+Chameleon.m: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+Chameleon.m 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 9/20/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import "UILabel+Chameleon.h" 10 | 11 | @implementation UILabel (Chameleon) 12 | 13 | - (void)setSubstituteFontName:(NSString *)name UI_APPEARANCE_SELECTOR { 14 | 15 | self.font = [UIFont fontWithName:name size:self.font.pointSize]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIAppearance+Swift.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAppearance+Swift.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 11/26/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (UIViewAppearance_Swift) 12 | 13 | // @param containers An array of Class < UIAppearanceContainer > 14 | // http://stackoverflow.com/a/28765193 15 | + (instancetype)appearanceWhenContainedWithin:(NSArray *)containers; 16 | 17 | @end -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/ChameleonConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // Constants.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /** 13 | * A contrasting status bar, intended for use on any backgrounds. 14 | * 15 | * @since 2.0 16 | */ 17 | extern const UIStatusBarStyle UIStatusBarStyleContrast; 18 | 19 | @interface ChameleonConstants : NSObject 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SnapKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIImage+ChameleonPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ChameleonPrivate.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/8/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (ChameleonPrivate) 12 | 13 | #pragma mark - Class Methods 14 | 15 | + (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize; 16 | 17 | #pragma mark - Instance Methods 18 | 19 | - (UIImage *)imageScaledToSize:(CGSize)newSize; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ObjectMapper/ObjectMapper.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ObjectMapper 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIButton+Chameleon.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Chameleon.m 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 9/20/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import "UIButton+Chameleon.h" 10 | 11 | @implementation UIButton (Chameleon) 12 | 13 | #pragma GCC diagnostic push 14 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 15 | 16 | - (void)setSubstituteFontName:(NSString *)name UI_APPEARANCE_SELECTOR { 17 | 18 | self.font = [UIFont fontWithName:name size:self.font.pointSize]; 19 | } 20 | 21 | #pragma GCC diagnostic pop 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireImage/AlamofireImage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AlamofireImage 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ChameleonFramework/ChameleonFramework.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ChameleonFramework 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "QuartzCore" -framework "UIKit" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireObjectMapper/AlamofireObjectMapper.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /Example/BigBoardTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ChameleonFramework/ChameleonFramework-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "Chameleon.h" 4 | #import "ChameleonConstants.h" 5 | #import "ChameleonEnums.h" 6 | #import "ChameleonMacros.h" 7 | #import "Chameleon_.h" 8 | #import "NSArray+Chameleon.h" 9 | #import "UIAppearance+Swift.h" 10 | #import "UIButton+Chameleon.h" 11 | #import "UIColor+Chameleon.h" 12 | #import "UIColor+ChameleonPrivate.h" 13 | #import "UIImage+ChameleonPrivate.h" 14 | #import "UILabel+Chameleon.h" 15 | #import "UINavigationController+Chameleon.h" 16 | #import "UIView+ChameleonPrivate.h" 17 | #import "UIViewController+Chameleon.h" 18 | 19 | FOUNDATION_EXPORT double ChameleonFrameworkVersionNumber; 20 | FOUNDATION_EXPORT const unsigned char ChameleonFrameworkVersionString[]; 21 | 22 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BigBoard/BigBoard.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/BigBoard 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pod/String+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Naoto Kaneko on 2015/03/01. 6 | // Copyright (c) 2015年 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension String { 12 | // MARK - Parse into NSDate 13 | 14 | @available(*, deprecated: 2.0, renamed: "dateFromFormat(_:locale:)") 15 | func dateFromFormat(_ format: String) -> Date? { 16 | return dateFromFormat(format, locale: DateFormatter().locale) 17 | } 18 | 19 | func dateFromFormat(_ format: String, locale: Locale) -> Date? { 20 | let formatter = DateFormatter() 21 | formatter.locale = locale 22 | formatter.dateFormat = format 23 | return formatter.date(from: self) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Pod/Classes/String+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Naoto Kaneko on 2015/03/01. 6 | // Copyright (c) 2015年 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension String { 12 | // MARK - Parse into NSDate 13 | 14 | @available(*, deprecated: 2.0, renamed: "dateFromFormat(_:locale:)") 15 | func dateFromFormat(_ format: String) -> Date? { 16 | return dateFromFormat(format, locale: DateFormatter().locale) 17 | } 18 | 19 | func dateFromFormat(_ format: String, locale: Locale) -> Date? { 20 | let formatter = DateFormatter() 21 | formatter.locale = locale 22 | formatter.dateFormat = format 23 | return formatter.date(from: self) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Alamofire/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BigBoard/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireImage/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ObjectMapper/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ChameleonFramework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoardTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AlamofireObjectMapper/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoard_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleAddStockModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleAddStockModel.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/20/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleAddStockModel: NSObject { 12 | 13 | var searchResultStocks:[BigBoardSearchResultStock] = [] 14 | 15 | func numberOfSearchResultStocks() -> Int { 16 | return searchResultStocks.count 17 | } 18 | 19 | func searchResultStockAtIndex(_ index:Int) -> BigBoardSearchResultStock { 20 | return searchResultStocks[index] 21 | } 22 | 23 | func fetchStocksForSearchTerm(_ searchTerm:String, success:@escaping (() -> Void), failure:@escaping (BigBoardError) -> Void) { 24 | _ = BigBoard.stocksContainingSearchTerm(searchTerm: searchTerm, success: { (stocks:[BigBoardSearchResultStock]) in 25 | self.searchResultStocks = stocks 26 | success() 27 | }, failure: failure) 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Example/BigBoard/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UINavigationController+Chameleon.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+Chameleon.h 3 | // ChameleonDemo 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ChameleonEnums.h" 11 | 12 | @interface UINavigationController (Chameleon) 13 | 14 | /** 15 | * Sets the status bar style for the specified @c UINavigationController and all its child controllers. 16 | * 17 | * @param statusBarStyle The style of the device's status bar. 18 | * 19 | * @note Chameleon introduces a new @c statusBarStyle called @c UIStatusBarStyleContrast. 20 | * 21 | * @since 2.0 22 | */ 23 | - (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle; 24 | 25 | /** 26 | * Hides the hairline view at the bottom of a navigation bar. The default value is @c NO. 27 | * 28 | * @since 2.0.3 29 | */ 30 | @property (nonatomic, assign) BOOL hidesNavigationBarHairline; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIColor+ChameleonPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+ChameleonPrivate.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/6/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UIColor (ChameleonPrivate) 13 | 14 | @property (nonatomic, readwrite) NSUInteger count; 15 | 16 | #pragma mark - Class Methods 17 | 18 | + (UIColor *)colorFromImage:(UIImage *)image atPoint:(CGPoint)point; 19 | 20 | - (UIColor *)colorWithMinimumSaturation:(CGFloat)saturation; 21 | 22 | #pragma mark - Instance Methods 23 | 24 | - (BOOL)isDistinct:(UIColor *)color; 25 | 26 | - (BOOL)getValueForX:(CGFloat *)X 27 | valueForY:(CGFloat *)Y 28 | valueForZ:(CGFloat *)Z 29 | alpha:(CGFloat *)alpha; 30 | 31 | - (BOOL)getLightness:(CGFloat *)L 32 | valueForA:(CGFloat *)A 33 | valueForB:(CGFloat *)B 34 | alpha:(CGFloat *)alpha; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/Chameleon.h: -------------------------------------------------------------------------------- 1 | // 2 | // Chameleon.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 9/24/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Chameleon. 12 | FOUNDATION_EXPORT double ChameleonVersionNumber; 13 | 14 | //! Project version string for Chameleon. 15 | FOUNDATION_EXPORT const unsigned char ChameleonVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import "Chameleon_.h" 20 | 21 | #import "UIButton+Chameleon.h" 22 | #import "UILabel+Chameleon.h" 23 | #import "UIColor+ChameleonPrivate.h" 24 | #import "UIImage+ChameleonPrivate.h" 25 | #import "UIView+ChameleonPrivate.h" 26 | #import "UIAppearance+Swift.h" 27 | 28 | #import "NSArray+Chameleon.h" 29 | #import "UIColor+Chameleon.h" 30 | #import "UINavigationController+Chameleon.h" 31 | #import "UIViewController+Chameleon.h" 32 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/ChameleonEnums.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChameleonEnums.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/8/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #ifndef Chameleon_ChameleonEnums_h 10 | #define Chameleon_ChameleonEnums_h 11 | 12 | /** 13 | * Specifies how text-based UI elements and other content such as switch knobs, should be colored. 14 | * 15 | * @since 2.0 16 | */ 17 | 18 | typedef NS_ENUM(NSUInteger, UIContentStyle) { 19 | /** 20 | * Automatically chooses and colors text-based elements with the shade that best contrasts its @c backgroundColor. 21 | * 22 | * @since 2.0 23 | */ 24 | UIContentStyleContrast, 25 | /** 26 | * Colors text-based elements using a light shade. 27 | * 28 | * @since 2.0 29 | */ 30 | UIContentStyleLight, 31 | /** 32 | * Colors text-based elements using a light shade. 33 | * 34 | * @since 2.0 35 | */ 36 | UIContentStyleDark 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2016 Dalton Hinterscher 3 | 4 | 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: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | 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. 9 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2014 Hearst 3 | 4 | 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: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | 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. 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: objective-c 3 | osx_image: xcode8 4 | 5 | env: 6 | global: 7 | - WORKSPACE=Example/BigBoard.xcworkspace 8 | - IOS_FRAMEWORK_SCHEME="BigBoard-Example" 9 | - IOS_SDK=iphonesimulator10.0 10 | - EXAMPLE_SCHEME="BigBoard-Example" 11 | matrix: 12 | - DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" 13 | - DESTINATION="OS=10.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" 14 | script: 15 | - set -o pipefail 16 | - xcodebuild -version 17 | - xcodebuild -showsdks 18 | 19 | # Build Framework in Debug and Run Tests if specified 20 | - if [ $RUN_TESTS == "YES" ]; then 21 | xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c; 22 | else 23 | xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; 24 | fi 25 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/BigBoard.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BigBoard", 3 | "version": "1.0.2", 4 | "summary": "An Elegant Financial Markets Library Written in Swift", 5 | "description": "BigBoard is an elegant financial markets library for iOS written in Swift. Under the hood, BigBoard makes requests to Yahoo Finance API's. Those requests are then processed and clean, friendly, and easy to use objects are returned. The goal of BigBoard is to take the learning curve out of the Yahoo Finance API's and centralize all finanical market data into one core library.", 6 | "homepage": "https://github.com/Daltron/BigBoard", 7 | "license": "MIT", 8 | "authors": { 9 | "Dalton Hinterscher": "daltonhint4@gmail.com" 10 | }, 11 | "source": { 12 | "git": "https://github.com/Daltron/BigBoard.git", 13 | "tag": "1.0.2" 14 | }, 15 | "requires_arc": true, 16 | "source_files": "Pod/Classes/**/*", 17 | "platforms": { 18 | "ios": "9.0" 19 | }, 20 | "dependencies": { 21 | "AlamofireObjectMapper": [ 22 | "~> 4.0" 23 | ], 24 | "AlamofireImage": [ 25 | "~> 3.0" 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIAppearance+Swift.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIAppearance+Swift.m 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 11/26/15. 6 | // Copyright © 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import "UIAppearance+Swift.h" 10 | 11 | @implementation UIView (UIViewAppearance_Swift) 12 | 13 | + (instancetype)appearanceWhenContainedWithin: (NSArray *)containers { 14 | 15 | NSUInteger count = containers.count; 16 | NSAssert(count <= 10, @"The count of containers greater than 10 is not supported."); 17 | 18 | return [self appearanceWhenContainedIn: 19 | count > 0 ? containers[0] : nil, 20 | count > 1 ? containers[1] : nil, 21 | count > 2 ? containers[2] : nil, 22 | count > 3 ? containers[3] : nil, 23 | count > 4 ? containers[4] : nil, 24 | count > 5 ? containers[5] : nil, 25 | count > 6 ? containers[6] : nil, 26 | count > 7 ? containers[7] : nil, 27 | count > 8 ? containers[8] : nil, 28 | count > 9 ? containers[9] : nil, 29 | nil]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/Alamofire/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/AlamofireImage/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2016 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleStockDetailsModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleStockDetailsModel.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/18/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleStockDetailsModel: NSObject { 12 | 13 | var stock:BigBoardStock! 14 | var rssFeed:BigBoardRSSFeed! 15 | 16 | init(stock:BigBoardStock) { 17 | super.init() 18 | self.stock = stock 19 | } 20 | 21 | func numberOfRSSFeedItems() -> Int { 22 | if let rssFeed = rssFeed { 23 | return rssFeed.items!.count 24 | } else { 25 | return 0 26 | } 27 | } 28 | 29 | func rssFeedItemAtIndex(_ index:Int) -> BigBoardRSSFeedItem { 30 | return rssFeed.items![index] 31 | } 32 | 33 | func loadRSSFeed(success:@escaping (() -> Void), failure:@escaping ((BigBoardError) -> Void)) { 34 | _ = BigBoard.rssFeedForStockWithSymbol(symbol: stock.symbol!, success: { (feed) in 35 | self.rssFeed = feed 36 | success() 37 | }) { (error) in 38 | failure(error) 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/Pods/AlamofireObjectMapper/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Tristan Himmelman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/LICENSE.md: -------------------------------------------------------------------------------- 1 | ##The MIT License (MIT) 2 | 3 | > Copyright (c) 2014-2015 Vicc Alexander 4 | 5 | > Permission is hereby granted, free of charge, to any person obtaining a copy 6 | > of this software and associated documentation files (the "Software"), to deal 7 | > in the Software without restriction, including without limitation the rights 8 | > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | > copies of the Software, and to permit persons to whom the Software is 10 | > furnished to do so, subject to the following conditions: 11 | 12 | > The above copyright notice and this permission notice shall be included in all 13 | > copies or substantial portions of the Software. 14 | 15 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | > SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pod/NSDateComponents+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSDateComponents+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 25/04/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension DateComponents { 12 | init(_ duration: Duration) { 13 | self.init() 14 | switch duration.unit{ 15 | case Calendar.Component.day: 16 | day = duration.value 17 | case Calendar.Component.weekday: 18 | weekday = duration.value 19 | case Calendar.Component.weekOfMonth: 20 | weekOfMonth = duration.value 21 | case Calendar.Component.weekOfYear: 22 | weekOfYear = duration.value 23 | case Calendar.Component.hour: 24 | hour = duration.value 25 | case Calendar.Component.minute: 26 | minute = duration.value 27 | case Calendar.Component.month: 28 | month = duration.value 29 | case Calendar.Component.second: 30 | second = duration.value 31 | case Calendar.Component.year: 32 | year = duration.value 33 | default: 34 | () // unsupported / ignore 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Pod/Classes/NSDateComponents+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSDateComponents+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 25/04/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension DateComponents { 12 | init(_ duration: Duration) { 13 | self.init() 14 | switch duration.unit{ 15 | case Calendar.Component.day: 16 | day = duration.value 17 | case Calendar.Component.weekday: 18 | weekday = duration.value 19 | case Calendar.Component.weekOfMonth: 20 | weekOfMonth = duration.value 21 | case Calendar.Component.weekOfYear: 22 | weekOfYear = duration.value 23 | case Calendar.Component.hour: 24 | hour = duration.value 25 | case Calendar.Component.minute: 26 | minute = duration.value 27 | case Calendar.Component.month: 28 | month = duration.value 29 | case Calendar.Component.second: 30 | second = duration.value 31 | case Calendar.Component.year: 32 | year = duration.value 33 | default: 34 | () // unsupported / ignore 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/ChameleonFramework.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChameleonFramework", 3 | "version": "2.1.0", 4 | "summary": "Color Framework for iOS (Obj-C & Swift)", 5 | "homepage": "https://github.com/ViccAlexander/Chameleon", 6 | "screenshots": "https://camo.githubusercontent.com/bde5aa6ee0e1feec044d184a735da8024c60c04c/687474703a2f2f692e696d6775722e636f6d2f427771486842342e706e67", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE.md" 10 | }, 11 | "authors": "Vicc Alexander", 12 | "social_media_url": "http://twitter.com/ViccsMind", 13 | "platforms": { 14 | "ios": "8.0" 15 | }, 16 | "source": { 17 | "git": "https://github.com/ViccAlexander/Chameleon.git", 18 | "tag": "2.1.0" 19 | }, 20 | "public_header_files": "Pod/Classes/Objective-C/**/*.h", 21 | "frameworks": [ 22 | "UIKit", 23 | "QuartzCore", 24 | "CoreGraphics" 25 | ], 26 | "default_subspecs": "Default", 27 | "subspecs": [ 28 | { 29 | "name": "Default", 30 | "source_files": "Pod/Classes/Objective-C/**/*.{h,m}" 31 | }, 32 | { 33 | "name": "Swift", 34 | "platforms": { 35 | "ios": "8.0" 36 | }, 37 | "source_files": "Pod/Classes/Swift/ChameleonShorthand.swift", 38 | "dependencies": { 39 | "ChameleonFramework/Default": [ 40 | 41 | ] 42 | } 43 | } 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoardTests/Pods-BigBoardTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/BigBoard" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage/AlamofireImage.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper/AlamofireObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/BigBoard/BigBoard.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "AlamofireImage" -framework "AlamofireObjectMapper" -framework "BigBoard" -framework "ObjectMapper" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoardTests/Pods-BigBoardTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/BigBoard" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage/AlamofireImage.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper/AlamofireObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/BigBoard/BigBoard.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "AlamofireImage" -framework "AlamofireObjectMapper" -framework "BigBoard" -framework "ObjectMapper" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pod/Int+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Int+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Naoto Kaneko on 2014/08/15. 6 | // Copyright (c) 2014年 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension Int { 12 | var year: Duration { 13 | return Duration(value: self, unit: .year) 14 | } 15 | var years: Duration { 16 | return year 17 | } 18 | 19 | var month: Duration { 20 | return Duration(value: self, unit: .month) 21 | } 22 | var months: Duration { 23 | return month 24 | } 25 | 26 | var week: Duration { 27 | return Duration(value: self, unit: .weekOfYear) 28 | } 29 | var weeks: Duration { 30 | return week 31 | } 32 | 33 | var day: Duration { 34 | return Duration(value: self, unit: .day) 35 | } 36 | var days: Duration { 37 | return day 38 | } 39 | 40 | var hour: Duration { 41 | return Duration(value: self, unit: .hour) 42 | } 43 | var hours: Duration { 44 | return hour 45 | } 46 | 47 | var minute: Duration { 48 | return Duration(value: self, unit: .minute) 49 | } 50 | var minutes: Duration { 51 | return minute 52 | } 53 | 54 | var second: Duration { 55 | return Duration(value: self, unit: .second) 56 | } 57 | var seconds: Duration { 58 | return second 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Pod/Classes/Int+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Int+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Naoto Kaneko on 2014/08/15. 6 | // Copyright (c) 2014年 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension Int { 12 | var year: Duration { 13 | return Duration(value: self, unit: .year) 14 | } 15 | var years: Duration { 16 | return year 17 | } 18 | 19 | var month: Duration { 20 | return Duration(value: self, unit: .month) 21 | } 22 | var months: Duration { 23 | return month 24 | } 25 | 26 | var week: Duration { 27 | return Duration(value: self, unit: .weekOfYear) 28 | } 29 | var weeks: Duration { 30 | return week 31 | } 32 | 33 | var day: Duration { 34 | return Duration(value: self, unit: .day) 35 | } 36 | var days: Duration { 37 | return day 38 | } 39 | 40 | var hour: Duration { 41 | return Duration(value: self, unit: .hour) 42 | } 43 | var hours: Duration { 44 | return hour 45 | } 46 | 47 | var minute: Duration { 48 | return Duration(value: self, unit: .minute) 49 | } 50 | var minutes: Duration { 51 | return minute 52 | } 53 | 54 | var second: Duration { 55 | return Duration(value: self, unit: .second) 56 | } 57 | var seconds: Duration { 58 | return second 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Example/Pods/AlamofireImage/Source/Image.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Image.swift 3 | // 4 | // Copyright (c) 2015-2016 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | #if os(iOS) || os(tvOS) || os(watchOS) 28 | import UIKit 29 | public typealias Image = UIImage 30 | #elseif os(OSX) 31 | import Cocoa 32 | public typealias Image = NSImage 33 | #endif 34 | -------------------------------------------------------------------------------- /Example/BigBoard/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UIStatusBarStyle 39 | UIStatusBarStyleLightContent 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/DictionaryTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DictionaryTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Milen Halachev on 7/20/16. 6 | // Copyright © 2016 hearst. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | ///Transforms [String: AnyObject] <-> [Key: Value] where Key is RawRepresentable as String, Value is Mappable 12 | public struct DictionaryTransform: TransformType where Key: Hashable, Key: RawRepresentable, Key.RawValue == String, Value: Mappable { 13 | 14 | public init() { 15 | 16 | } 17 | 18 | public func transformFromJSON(_ value: Any?) -> [Key: Value]? { 19 | 20 | guard let json = value as? [String: Any] else { 21 | 22 | return nil 23 | } 24 | 25 | let result = json.reduce([:]) { (result, element) -> [Key: Value] in 26 | 27 | guard 28 | let key = Key(rawValue: element.0), 29 | let valueJSON = element.1 as? [String: Any], 30 | let value = Value(JSON: valueJSON) 31 | else { 32 | 33 | return result 34 | } 35 | 36 | var result = result 37 | result[key] = value 38 | return result 39 | } 40 | 41 | return result 42 | } 43 | 44 | public func transformToJSON(_ value: [Key: Value]?) -> Any? { 45 | 46 | let result = value?.reduce([:]) { (result, element) -> [String: Any] in 47 | 48 | let key = element.0.rawValue 49 | let value = element.1.toJSON() 50 | 51 | var result = result 52 | result[key] = value 53 | return result 54 | } 55 | 56 | return result 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintView = UIView 33 | #else 34 | public typealias ConstraintView = NSView 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Tests/BigBoardTestsHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BigBoardTestsHelper.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/17/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ObjectMapper 11 | 12 | class BigBoardTestsHelper: NSObject { 13 | 14 | class func sampleDateRange() -> BigBoardHistoricalDateRange { 15 | return BigBoardHistoricalDateRange(startDate: sampleStartDate(), endDate: sampleEndDate()) 16 | } 17 | 18 | class func sampleStartDate() -> Date { 19 | let calendar = Calendar(identifier: Calendar.Identifier.gregorian) 20 | 21 | var dateComponents = DateComponents() 22 | dateComponents.year = 2015 23 | dateComponents.month = 6 24 | dateComponents.day = 4 25 | 26 | return calendar.date(from: dateComponents)! 27 | } 28 | 29 | class func sampleEndDate() -> Date { 30 | let calendar = Calendar(identifier: Calendar.Identifier.gregorian) 31 | 32 | var dateComponents = DateComponents() 33 | dateComponents.year = 2015 34 | dateComponents.month = 6 35 | dateComponents.day = 11 36 | 37 | return calendar.date(from: dateComponents)! 38 | } 39 | 40 | class func sampleStock() -> BigBoardStock { 41 | let sampleStock = BigBoardStock(map: Map(mappingType: .toJSON, JSON: [:])) 42 | sampleStock!.symbol = "GOOG" 43 | sampleStock!.name = "GOOGLE" 44 | return sampleStock! 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.0.1) 3 | - AlamofireImage (3.0.0): 4 | - Alamofire (~> 4.0) 5 | - AlamofireObjectMapper (4.0.0): 6 | - Alamofire (~> 4.0) 7 | - ObjectMapper (~> 2.0) 8 | - BigBoard (1.0.2): 9 | - AlamofireImage (~> 3.0) 10 | - AlamofireObjectMapper (~> 4.0) 11 | - ChameleonFramework/Default (2.1.0) 12 | - ChameleonFramework/Swift (2.1.0): 13 | - ChameleonFramework/Default 14 | - ObjectMapper (2.0.0) 15 | - SnapKit (3.0.1) 16 | 17 | DEPENDENCIES: 18 | - BigBoard (from `../`) 19 | - ChameleonFramework/Swift (from `https://github.com/ViccAlexander/Chameleon`, branch `swift3`) 20 | - SnapKit (~> 3.0) 21 | 22 | EXTERNAL SOURCES: 23 | BigBoard: 24 | :path: "../" 25 | ChameleonFramework: 26 | :branch: swift3 27 | :git: https://github.com/ViccAlexander/Chameleon 28 | 29 | CHECKOUT OPTIONS: 30 | ChameleonFramework: 31 | :commit: c400c32eead1c6e74008983c3e7c845ae069b41d 32 | :git: https://github.com/ViccAlexander/Chameleon 33 | 34 | SPEC CHECKSUMS: 35 | Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 36 | AlamofireImage: 6594aa1139a67dcd36cde6da79ea4e5b318e60fb 37 | AlamofireObjectMapper: 9faa3ce5a240efda1b209009a2d6e1e949227abc 38 | BigBoard: 144e36eb411e5aac38e1c7c8706960cfd813ffcb 39 | ChameleonFramework: d21a3cc247abfe5e37609a283a8238b03575cf64 40 | ObjectMapper: aed2570edabbd3c9b26c939e1cabdb6558f933e0 41 | SnapKit: f818b8326d45b4e1c777d0ab27b5c0a3624bfdeb 42 | 43 | PODFILE CHECKSUM: 9e1e15c97fde65079ea55365a606e79431bf3fa5 44 | 45 | COCOAPODS: 1.1.0.rc.2 46 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIView+ChameleonPrivate.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ChameleonPrivate.m 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import "UIView+ChameleonPrivate.h" 10 | 11 | @implementation UIView (ChameleonPrivate) 12 | 13 | - (BOOL)isTopViewInWindow { 14 | 15 | if (!self.window) { 16 | return NO; 17 | } 18 | 19 | CGPoint centerPointInSelf = CGPointMake(CGRectGetMidX(self.bounds), 20 | CGRectGetMidY(self.bounds)); 21 | 22 | CGPoint centerPointOfSelfInWindow = [self convertPoint:centerPointInSelf 23 | toView:(UIView *)self.window]; 24 | 25 | UIView *view = [(UIView *)self.window findTopMostViewForPoint:centerPointOfSelfInWindow]; 26 | BOOL isTopMost = view == self || [view isDescendantOfView:self]; 27 | 28 | return isTopMost; 29 | } 30 | 31 | - (UIView *)findTopMostViewForPoint:(CGPoint)point { 32 | 33 | for (int i = (int)self.subviews.count - 1; i >= 0; i--) { 34 | 35 | UIView *subview = self.subviews[i]; 36 | 37 | if (!subview.hidden && CGRectContainsPoint(subview.frame, point) && subview.alpha > 0.01) { 38 | CGPoint pointConverted = [self convertPoint:point toView:subview]; 39 | return [subview findTopMostViewForPoint:pointConverted]; 40 | } 41 | } 42 | 43 | return self; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.0.1) 3 | - AlamofireImage (3.0.0): 4 | - Alamofire (~> 4.0) 5 | - AlamofireObjectMapper (4.0.0): 6 | - Alamofire (~> 4.0) 7 | - ObjectMapper (~> 2.0) 8 | - BigBoard (1.0.2): 9 | - AlamofireImage (~> 3.0) 10 | - AlamofireObjectMapper (~> 4.0) 11 | - ChameleonFramework/Default (2.1.0) 12 | - ChameleonFramework/Swift (2.1.0): 13 | - ChameleonFramework/Default 14 | - ObjectMapper (2.0.0) 15 | - SnapKit (3.0.1) 16 | 17 | DEPENDENCIES: 18 | - BigBoard (from `../`) 19 | - ChameleonFramework/Swift (from `https://github.com/ViccAlexander/Chameleon`, branch `swift3`) 20 | - SnapKit (~> 3.0) 21 | 22 | EXTERNAL SOURCES: 23 | BigBoard: 24 | :path: "../" 25 | ChameleonFramework: 26 | :branch: swift3 27 | :git: https://github.com/ViccAlexander/Chameleon 28 | 29 | CHECKOUT OPTIONS: 30 | ChameleonFramework: 31 | :commit: c400c32eead1c6e74008983c3e7c845ae069b41d 32 | :git: https://github.com/ViccAlexander/Chameleon 33 | 34 | SPEC CHECKSUMS: 35 | Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 36 | AlamofireImage: 6594aa1139a67dcd36cde6da79ea4e5b318e60fb 37 | AlamofireObjectMapper: 9faa3ce5a240efda1b209009a2d6e1e949227abc 38 | BigBoard: 144e36eb411e5aac38e1c7c8706960cfd813ffcb 39 | ChameleonFramework: d21a3cc247abfe5e37609a283a8238b03575cf64 40 | ObjectMapper: aed2570edabbd3c9b26c939e1cabdb6558f933e0 41 | SnapKit: f818b8326d45b4e1c777d0ab27b5c0a3624bfdeb 42 | 43 | PODFILE CHECKSUM: 9e1e15c97fde65079ea55365a606e79431bf3fa5 44 | 45 | COCOAPODS: 1.1.0.rc.2 46 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintInsets = UIEdgeInsets 33 | #else 34 | public typealias ConstraintInsets = EdgeInsets 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 9.0, *) 33 | public typealias ConstraintLayoutGuide = UILayoutGuide 34 | #else 35 | public class ConstraintLayoutGuide {} 36 | #endif 37 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 9.0, *) 30 | public extension ConstraintLayoutGuide { 31 | 32 | public var snp: ConstraintLayoutGuideDSL { 33 | return ConstraintLayoutGuideDSL(guide: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/TransformType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransformType.swift 3 | // ObjectMapper 4 | // 5 | // Created by Syo Ikeda on 2/4/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | public protocol TransformType { 30 | associatedtype Object 31 | associatedtype JSON 32 | 33 | func transformFromJSON(_ value: Any?) -> Object? 34 | func transformToJSON(_ value: Object?) -> JSON? 35 | } 36 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 8.0, *) 33 | public typealias ConstraintLayoutSupport = UILayoutSupport 34 | #else 35 | public class ConstraintLayoutSupport {} 36 | #endif 37 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 8.0, *) 30 | public extension ConstraintLayoutSupport { 31 | 32 | public var snp: ConstraintLayoutSupportDSL { 33 | return ConstraintLayoutSupportDSL(support: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Pod/Duration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Duration.swift 3 | // Timepiece 4 | // 5 | // Created by Naoto Kaneko on 2014/08/17. 6 | // Copyright (c) 2014年 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | prefix func - (duration: Duration) -> (Duration) { 12 | return Duration(value: -duration.value, unit: duration.unit) 13 | } 14 | 15 | open class Duration { 16 | open let value: Int 17 | open let unit: Calendar.Component 18 | fileprivate let calendar = Calendar.current 19 | 20 | /** 21 | Initialize a date before a duration. 22 | */ 23 | open var ago: Date { 24 | return ago(from: Date()) 25 | } 26 | 27 | open func ago(from date: Date) -> Date { 28 | return calendar.dateByAdding(duration: -self, to: date)! 29 | } 30 | 31 | /** 32 | Initialize a date after a duration. 33 | */ 34 | open var later: Date { 35 | return later(from: Date()) 36 | } 37 | 38 | open func later(from date: Date) -> Date { 39 | return calendar.dateByAdding(duration: self, to: date)! 40 | } 41 | 42 | /** 43 | This conversion is deprecated in 0.4.1 and will be obsoleted in 0.5.0. 44 | 45 | This operation is performed under incorrect assumption that 1 month is always equal to 30 days. 46 | */ 47 | open lazy var interval: TimeInterval = { [unowned self] in 48 | return self.unit.interval * TimeInterval(self.value) 49 | }() 50 | 51 | public init(value: Int, unit: Calendar.Component) { 52 | self.value = value 53 | self.unit = unit 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Pod/Classes/Duration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Duration.swift 3 | // Timepiece 4 | // 5 | // Created by Naoto Kaneko on 2014/08/17. 6 | // Copyright (c) 2014年 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | prefix func - (duration: Duration) -> (Duration) { 12 | return Duration(value: -duration.value, unit: duration.unit) 13 | } 14 | 15 | open class Duration { 16 | open let value: Int 17 | open let unit: Calendar.Component 18 | fileprivate let calendar = Calendar.current 19 | 20 | /** 21 | Initialize a date before a duration. 22 | */ 23 | open var ago: Date { 24 | return ago(from: Date()) 25 | } 26 | 27 | open func ago(from date: Date) -> Date { 28 | return calendar.dateByAdding(duration: -self, to: date)! 29 | } 30 | 31 | /** 32 | Initialize a date after a duration. 33 | */ 34 | open var later: Date { 35 | return later(from: Date()) 36 | } 37 | 38 | open func later(from date: Date) -> Date { 39 | return calendar.dateByAdding(duration: self, to: date)! 40 | } 41 | 42 | /** 43 | This conversion is deprecated in 0.4.1 and will be obsoleted in 0.5.0. 44 | 45 | This operation is performed under incorrect assumption that 1 month is always equal to 30 days. 46 | */ 47 | open lazy var interval: TimeInterval = { [unowned self] in 48 | return self.unit.interval * TimeInterval(self.value) 49 | }() 50 | 51 | public init(value: Int, unit: Calendar.Component) { 52 | self.value = value 53 | self.unit = unit 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleModel.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/18/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleModel: NSObject { 12 | 13 | var stocks:[BigBoardStock] = [] 14 | 15 | func numberOfStocks() -> Int { 16 | return stocks.count 17 | } 18 | 19 | func stockAtIndex(_ index:Int) -> BigBoardStock { 20 | return stocks[index] 21 | } 22 | 23 | func refreshStocks(success:@escaping (() -> Void), failure:@escaping (BigBoardError) -> Void) { 24 | 25 | var stockSymbols:[String] = [] 26 | 27 | for stock in stocks { 28 | stockSymbols.append(stock.symbol!) 29 | } 30 | 31 | _ = BigBoard.stocksWithSymbols(symbols: stockSymbols, success: { (stocks) in 32 | self.stocks = stocks 33 | success() 34 | }, failure: failure) 35 | } 36 | 37 | func mapSampleStocks(success:@escaping (() -> Void), failure:@escaping ((BigBoardError) -> Void)) { 38 | _ = BigBoard.stocksWithSymbols(symbols: ["GOOG", "AAPL", "TSLA"], success: { (stocks) in 39 | self.stocks = stocks 40 | success() 41 | }, failure: failure) 42 | } 43 | 44 | func mapStockWithSymbol(symbol:String, success:@escaping (() -> Void), failure:@escaping ((BigBoardError) -> Void)) { 45 | _ = BigBoard.stockWithSymbol(symbol: symbol, success: { (stock) in 46 | self.stocks.append(stock) 47 | success() 48 | }, failure: failure) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoard_Example/Pods-BigBoard_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/BigBoard" "$PODS_CONFIGURATION_BUILD_DIR/ChameleonFramework" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage/AlamofireImage.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper/AlamofireObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/BigBoard/BigBoard.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ChameleonFramework/ChameleonFramework.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "AlamofireImage" -framework "AlamofireObjectMapper" -framework "BigBoard" -framework "ChameleonFramework" -framework "ObjectMapper" -framework "SnapKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BigBoard_Example/Pods-BigBoard_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage" "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/BigBoard" "$PODS_CONFIGURATION_BUILD_DIR/ChameleonFramework" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireImage/AlamofireImage.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/AlamofireObjectMapper/AlamofireObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/BigBoard/BigBoard.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ChameleonFramework/ChameleonFramework.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "AlamofireImage" -framework "AlamofireObjectMapper" -framework "BigBoard" -framework "ChameleonFramework" -framework "ObjectMapper" -framework "SnapKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection 27 | #else 28 | import AppKit 29 | public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection 30 | #endif 31 | 32 | 33 | public struct ConstraintConfig { 34 | 35 | public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Pod/Classes/NSDate+BigBoard.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import Foundation 20 | 21 | public extension Date { 22 | 23 | public func isSameDayAsDate(_ date:Date) -> Bool { 24 | let calendar = Calendar(identifier: Calendar.Identifier.gregorian) 25 | return calendar.isDate(self, inSameDayAs: date) 26 | } 27 | 28 | public func isOnAWeekend() -> Bool { 29 | return isSaturday() || isSunday() 30 | } 31 | 32 | public func isSaturday() -> Bool { 33 | return weekday == 7 34 | } 35 | 36 | public func isSunday() -> Bool { 37 | return weekday == 1 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/ISO8601DateTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ISO8601DateTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Jean-Pierre Mouilleseaux on 21 Nov 2014. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class ISO8601DateTransform: DateFormatterTransform { 32 | 33 | public init() { 34 | let formatter = DateFormatter() 35 | formatter.locale = Locale(identifier: "en_US_POSIX") 36 | formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" 37 | 38 | super.init(dateFormatter: formatter) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/CustomDateFormatTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomDateFormatTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Dan McCracken on 3/8/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class CustomDateFormatTransform: DateFormatterTransform { 32 | 33 | public init(formatString: String) { 34 | let formatter = DateFormatter() 35 | formatter.locale = Locale(identifier: "en_US_POSIX") 36 | formatter.dateFormat = formatString 37 | 38 | super.init(dateFormatter: formatter) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 9.0, *) 32 | public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { 33 | 34 | public var target: AnyObject? { 35 | return self.guide 36 | } 37 | 38 | internal let guide: ConstraintLayoutGuide 39 | 40 | internal init(guide: ConstraintLayoutGuide) { 41 | self.guide = guide 42 | 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardSearchResultStock.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import ObjectMapper 20 | 21 | open class BigBoardSearchResultStock: Mappable { 22 | 23 | open var symbol:String? 24 | open var name:String? 25 | open var exch:String? 26 | open var type:String? 27 | open var exchDisp:String? 28 | open var typeDisp:String? 29 | 30 | required public init?(map: Map) { 31 | mapping(map: map) 32 | } 33 | 34 | open func mapping(map: Map) { 35 | symbol <- map["symbol"] 36 | name <- map["name"] 37 | exch <- map["exch"] 38 | type <- map["type"] 39 | exchDisp <- map["exchDisp"] 40 | typeDisp <- map["typeDisp"] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /BigBoard.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint BigBoard.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = "BigBoard" 11 | s.version = "1.1.7" 12 | s.summary = "An Elegant Financial Markets Library Written in Swift" 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | s.description = <<-DESC 20 | BigBoard is an elegant financial markets library for iOS written in Swift. Under the hood, BigBoard makes requests to Yahoo Finance API's. Those requests are then processed and clean, friendly, and easy to use objects are returned. The goal of BigBoard is to take the learning curve out of the Yahoo Finance API's and centralize all finanical market data into one core library. 21 | DESC 22 | 23 | s.homepage = "https://github.com/Daltron/BigBoard" 24 | s.license = 'MIT' 25 | s.author = { "Dalton Hinterscher" => "daltonhint4@gmail.com" } 26 | s.source = { :git => "https://github.com/Daltron/BigBoard.git", :tag => s.version.to_s } 27 | 28 | s.requires_arc = true 29 | 30 | s.source_files = 'Pod/Classes/**/*' 31 | 32 | s.osx.deployment_target = '10.11' 33 | s.ios.deployment_target = '9.0' 34 | 35 | s.dependency 'AlamofireObjectMapper', '~> 4.0' 36 | s.dependency 'AlamofireImage', '~> 3.0' 37 | end 38 | -------------------------------------------------------------------------------- /Pod/NSTimeInterval+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimeInterval+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 10/05/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /** 12 | This extension is deprecated in 0.4.1 and will be obsoleted in 0.5.0. 13 | 14 | The conversion of Duration into NSTimeInterval is performed under incorrect assumption that 1 month is always equal to 30 days. 15 | Therefore, The comparison between Duration and NSTimeInterval is also incorrect. 16 | */ 17 | 18 | public func < (lhs: TimeInterval, rhs: Duration) -> Bool { 19 | return lhs < rhs.interval 20 | } 21 | 22 | public func < (lhs: Duration, rhs: TimeInterval) -> Bool { 23 | return lhs.interval < rhs 24 | } 25 | 26 | public func > (lhs: TimeInterval, rhs: Duration) -> Bool { 27 | return lhs > rhs.interval 28 | } 29 | 30 | public func > (lhs: Duration, rhs: TimeInterval) -> Bool { 31 | return lhs.interval > rhs 32 | } 33 | 34 | public func == (lhs: TimeInterval, rhs: Duration) -> Bool { 35 | return lhs == rhs.interval 36 | } 37 | 38 | public func == (lhs: Duration, rhs: TimeInterval) -> Bool { 39 | return lhs.interval == rhs 40 | } 41 | 42 | public func >= (lhs: TimeInterval, rhs: Duration) -> Bool { 43 | return lhs >= rhs.interval 44 | } 45 | 46 | public func >= (lhs: Duration, rhs: TimeInterval) -> Bool { 47 | return lhs.interval >= rhs 48 | } 49 | 50 | public func <= (lhs: TimeInterval, rhs: Duration) -> Bool { 51 | return lhs <= rhs.interval 52 | } 53 | 54 | public func <= (lhs: Duration, rhs: TimeInterval) -> Bool { 55 | return lhs.interval <= rhs 56 | } 57 | 58 | public func != (lhs: TimeInterval, rhs: Duration) -> Bool { 59 | return lhs != rhs.interval 60 | } 61 | 62 | public func != (lhs: Duration, rhs: TimeInterval) -> Bool { 63 | return lhs.interval != rhs 64 | } 65 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardRSSFeed.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import ObjectMapper 20 | 21 | open class BigBoardRSSFeed: Mappable { 22 | 23 | open var title:String? 24 | open var link:String? 25 | open var author:String? 26 | open var description:String? 27 | open var imageLink:String? 28 | open var items:[BigBoardRSSFeedItem]? 29 | 30 | required public init?(map: Map) { 31 | mapping(map: map) 32 | } 33 | 34 | open func mapping(map: Map) { 35 | title <- map["feed.title"] 36 | link <- map["feed.link"] 37 | author <- map["feed.author"] 38 | description <- map["feed.description"] 39 | imageLink <- map["feed.image"] 40 | items <- map["items"] 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleAddStockViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleAddStockViewController.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/20/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleAddStockViewController: UIViewController, ExampleAddStockViewDelegate { 12 | 13 | var model:ExampleAddStockModel! 14 | var exampleView:ExampleAddStockView! 15 | var selectionCallback:((BigBoardSearchResultStock) -> Void)! 16 | 17 | init(selectionCallback:@escaping ((BigBoardSearchResultStock) -> Void)){ 18 | super.init(nibName: nil, bundle: nil) 19 | edgesForExtendedLayout = UIRectEdge() 20 | self.selectionCallback = selectionCallback 21 | model = ExampleAddStockModel() 22 | exampleView = ExampleAddStockView(delegate: self) 23 | view = exampleView 24 | title = "Add Stock" 25 | } 26 | 27 | required init?(coder aDecoder: NSCoder) { 28 | fatalError("init(coder:) has not been implemented") 29 | } 30 | 31 | // MARK: ExampleAddStockViewDelegate Implementation 32 | 33 | func numberOfSearchResultStocks() -> Int { 34 | return model.numberOfSearchResultStocks() 35 | } 36 | 37 | func searchResultStockAtIndex(_ index:Int) -> BigBoardSearchResultStock { 38 | return model.searchResultStockAtIndex(index) 39 | } 40 | 41 | func searchTermChanged(searchTerm:String) { 42 | model.fetchStocksForSearchTerm(searchTerm, success: { 43 | self.exampleView.stocksTableView.reloadData() 44 | }) { (error) in 45 | print(error) 46 | } 47 | } 48 | 49 | func stockResultSelectedAtIndex(_ index: Int) { 50 | selectionCallback(searchResultStockAtIndex(index)) 51 | navigationController!.popViewController(animated: true) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Pod/Classes/NSTimeInterval+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimeInterval+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 10/05/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /** 12 | This extension is deprecated in 0.4.1 and will be obsoleted in 0.5.0. 13 | 14 | The conversion of Duration into NSTimeInterval is performed under incorrect assumption that 1 month is always equal to 30 days. 15 | Therefore, The comparison between Duration and NSTimeInterval is also incorrect. 16 | */ 17 | 18 | public func < (lhs: TimeInterval, rhs: Duration) -> Bool { 19 | return lhs < rhs.interval 20 | } 21 | 22 | public func < (lhs: Duration, rhs: TimeInterval) -> Bool { 23 | return lhs.interval < rhs 24 | } 25 | 26 | public func > (lhs: TimeInterval, rhs: Duration) -> Bool { 27 | return lhs > rhs.interval 28 | } 29 | 30 | public func > (lhs: Duration, rhs: TimeInterval) -> Bool { 31 | return lhs.interval > rhs 32 | } 33 | 34 | public func == (lhs: TimeInterval, rhs: Duration) -> Bool { 35 | return lhs == rhs.interval 36 | } 37 | 38 | public func == (lhs: Duration, rhs: TimeInterval) -> Bool { 39 | return lhs.interval == rhs 40 | } 41 | 42 | public func >= (lhs: TimeInterval, rhs: Duration) -> Bool { 43 | return lhs >= rhs.interval 44 | } 45 | 46 | public func >= (lhs: Duration, rhs: TimeInterval) -> Bool { 47 | return lhs.interval >= rhs 48 | } 49 | 50 | public func <= (lhs: TimeInterval, rhs: Duration) -> Bool { 51 | return lhs <= rhs.interval 52 | } 53 | 54 | public func <= (lhs: Duration, rhs: TimeInterval) -> Bool { 55 | return lhs.interval <= rhs 56 | } 57 | 58 | public func != (lhs: TimeInterval, rhs: Duration) -> Bool { 59 | return lhs != rhs.interval 60 | } 61 | 62 | public func != (lhs: Duration, rhs: TimeInterval) -> Bool { 63 | return lhs.interval != rhs 64 | } 65 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/EnumTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EnumTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Kaan Dedeoglu on 3/20/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class EnumTransform: TransformType { 32 | public typealias Object = T 33 | public typealias JSON = T.RawValue 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(_ value: Any?) -> T? { 38 | if let raw = value as? T.RawValue { 39 | return T(rawValue: raw) 40 | } 41 | return nil 42 | } 43 | 44 | public func transformToJSON(_ value: T?) -> T.RawValue? { 45 | if let obj = value { 46 | return obj.rawValue 47 | } 48 | return nil 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintRelation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | internal enum ConstraintRelation: Int { 32 | case equal = 1 33 | case lessThanOrEqual 34 | case greaterThanOrEqual 35 | 36 | internal var layoutRelation: NSLayoutRelation { 37 | get { 38 | switch(self) { 39 | case .equal: 40 | return .equal 41 | case .lessThanOrEqual: 42 | return .lessThanOrEqual 43 | case .greaterThanOrEqual: 44 | return .greaterThanOrEqual 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardHistoricalData.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import ObjectMapper 20 | 21 | open class BigBoardHistoricalData: Mappable { 22 | 23 | open var symbol:String? 24 | open var date:String? 25 | open var open:String? 26 | open var high:String? 27 | open var low:String? 28 | open var close:String? 29 | open var volume:String? 30 | open var adjClose:String? 31 | 32 | required public init?(map: Map) { 33 | mapping(map: map) 34 | } 35 | 36 | open func mapping(map: Map) { 37 | symbol <- map["Symbol"] 38 | date <- map["Date"] 39 | open <- map["Open"] 40 | high <- map["High"] 41 | low <- map["Low"] 42 | close <- map["Close"] 43 | volume <- map["Volume"] 44 | adjClose <- map["Adj_Close"] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Pod/NSCalendarUnit+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSCalendarUnit+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 13/05/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /** 12 | This extension is deprecated in 0.4.1 and will be obsoleted in 0.5.0. 13 | 14 | The conversion of Duration into NSTimeInterval is performed under incorrect assumption that 1 month is always equal to 30 days. 15 | Therefore, The comparison between Duration and NSTimeInterval is also incorrect. 16 | */ 17 | public extension Calendar.Component { 18 | public var interval: TimeInterval { 19 | switch self { 20 | case Calendar.Component.nanosecond: return 1e-9 // 1e-9 second 21 | case Calendar.Component.second: return 1 // 1 second 22 | case Calendar.Component.minute: return 60 // 1 minute 23 | case Calendar.Component.hour: return 3600 // 1 hour 24 | case Calendar.Component.weekday, 25 | Calendar.Component.weekdayOrdinal, 26 | Calendar.Component.day: return 86400 // 1 day 27 | case Calendar.Component.weekOfYear, 28 | Calendar.Component.weekOfMonth: return 604800 // 7 days 29 | case Calendar.Component.month: return 2592000 // 30 days 30 | case Calendar.Component.yearForWeekOfYear, 31 | Calendar.Component.quarter: return 146097/400/4*86400 // ~91.31 days 32 | case Calendar.Component.year: return 146097/400*86400 // ~365.25 days 33 | // 400 years have 146097 days (taking into account leap year rules) 34 | 35 | default: 36 | print("warn: .interval for NSCalendarUnit(\(self)) can't be determined. Returning 0.") 37 | return 0 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/DataTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Yagrushkin, Evgeny on 8/30/16. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class DataTransform: TransformType { 32 | public typealias Object = Data 33 | public typealias JSON = String 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(_ value: Any?) -> Data? { 38 | guard let string = value as? String else{ 39 | return nil 40 | } 41 | return Data(base64Encoded: string) 42 | } 43 | 44 | public func transformToJSON(_ value: Data?) -> String? { 45 | guard let data = value else{ 46 | return nil 47 | } 48 | return data.base64EncodedString() 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pod/Classes/NSCalendarUnit+Timepiece.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSCalendarUnit+Timepiece.swift 3 | // Timepiece 4 | // 5 | // Created by Mattijs on 13/05/15. 6 | // Copyright (c) 2015 Naoto Kaneko. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /** 12 | This extension is deprecated in 0.4.1 and will be obsoleted in 0.5.0. 13 | 14 | The conversion of Duration into NSTimeInterval is performed under incorrect assumption that 1 month is always equal to 30 days. 15 | Therefore, The comparison between Duration and NSTimeInterval is also incorrect. 16 | */ 17 | public extension Calendar.Component { 18 | public var interval: TimeInterval { 19 | switch self { 20 | case Calendar.Component.nanosecond: return 1e-9 // 1e-9 second 21 | case Calendar.Component.second: return 1 // 1 second 22 | case Calendar.Component.minute: return 60 // 1 minute 23 | case Calendar.Component.hour: return 3600 // 1 hour 24 | case Calendar.Component.weekday, 25 | Calendar.Component.weekdayOrdinal, 26 | Calendar.Component.day: return 86400 // 1 day 27 | case Calendar.Component.weekOfYear, 28 | Calendar.Component.weekOfMonth: return 604800 // 7 days 29 | case Calendar.Component.month: return 2592000 // 30 days 30 | case Calendar.Component.yearForWeekOfYear, 31 | Calendar.Component.quarter: return 146097/400/4*86400 // ~91.31 days 32 | case Calendar.Component.year: return 146097/400*86400 // ~365.25 days 33 | // 400 years have 146097 days (taking into account leap year rules) 34 | 35 | default: 36 | print("warn: .interval for NSCalendarUnit(\(self)) can't be determined. Returning 0.") 37 | return 0 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerFinalizable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | @discardableResult 40 | public func labeled(_ label: String) -> ConstraintMakerFinalizable { 41 | self.description.label = label 42 | return self 43 | } 44 | 45 | public var constraint: Constraint { 46 | return self.description.constraint! 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/TransformOf.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransformOf.swift 3 | // ObjectMapper 4 | // 5 | // Created by Syo Ikeda on 1/23/15. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | open class TransformOf: TransformType { 30 | public typealias Object = ObjectType 31 | public typealias JSON = JSONType 32 | 33 | private let fromJSON: (JSONType?) -> ObjectType? 34 | private let toJSON: (ObjectType?) -> JSONType? 35 | 36 | public init(fromJSON: @escaping(JSONType?) -> ObjectType?, toJSON: @escaping(ObjectType?) -> JSONType?) { 37 | self.fromJSON = fromJSON 38 | self.toJSON = toJSON 39 | } 40 | 41 | public func transformFromJSON(_ value: Any?) -> ObjectType? { 42 | return fromJSON(value as? JSONType) 43 | } 44 | 45 | public func transformToJSON(_ value: ObjectType?) -> JSONType? { 46 | return toJSON(value) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleStockDetailsViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleStockDetailsViewController.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/18/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleStockDetailsViewController: UIViewController, ExampleStockDetailsViewDelegate { 12 | 13 | var model:ExampleStockDetailsModel! 14 | var exampleView:ExampleStockDetailsView! 15 | 16 | init(model:ExampleStockDetailsModel) { 17 | super.init(nibName: nil, bundle: nil) 18 | self.model = model 19 | exampleView = ExampleStockDetailsView(delegate: self) 20 | view = exampleView 21 | title = model.stock.name! 22 | edgesForExtendedLayout = UIRectEdge() 23 | } 24 | 25 | required init?(coder aDecoder: NSCoder) { 26 | fatalError("init(coder:) has not been implemented") 27 | } 28 | 29 | override func viewWillAppear(_ animated: Bool) { 30 | super.viewWillAppear(animated) 31 | 32 | exampleView.graphImageView.setGraphAsImageForStock(stock: model.stock, timelineInMonths: 3, movingAverageTrendlineDays: [5, 10, 50]) { (error) in 33 | print(error) 34 | } 35 | 36 | model.loadRSSFeed(success: { 37 | print("RSS Feed sucessfully mapped") 38 | print("--------------------------") 39 | self.exampleView.rssFeedTableView.reloadData() 40 | }) { (error) in 41 | print(error) 42 | } 43 | 44 | } 45 | 46 | // MARK: ExampleStockDetailsViewDelegate Implementation 47 | 48 | func numberOfRSSFeedItems() -> Int { 49 | return model.numberOfRSSFeedItems() 50 | } 51 | 52 | func rssFeedItemAtIndex(_ index:Int) -> BigBoardRSSFeedItem { 53 | return model.rssFeedItemAtIndex(index) 54 | } 55 | 56 | func rssFeedItemSelectedAtIndex(_ index: Int) { 57 | let feedItemUrl = URL(string: model.rssFeedItemAtIndex(index).link!) 58 | UIApplication.shared.openURL(feedItemUrl!) 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/DateFormatterTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateFormatterTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2015-03-09. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class DateFormatterTransform: TransformType { 32 | public typealias Object = Date 33 | public typealias JSON = String 34 | 35 | let dateFormatter: DateFormatter 36 | 37 | public init(dateFormatter: DateFormatter) { 38 | self.dateFormatter = dateFormatter 39 | } 40 | 41 | public func transformFromJSON(_ value: Any?) -> Date? { 42 | if let dateString = value as? String { 43 | return dateFormatter.date(from: dateString) 44 | } 45 | return nil 46 | } 47 | 48 | public func transformToJSON(_ value: Date?) -> String? { 49 | if let date = value { 50 | return dateFormatter.string(from: date) 51 | } 52 | return nil 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/DateTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2014-10-13. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class DateTransform: TransformType { 32 | public typealias Object = Date 33 | public typealias JSON = Double 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(_ value: Any?) -> Date? { 38 | if let timeInt = value as? Double { 39 | return Date(timeIntervalSince1970: TimeInterval(timeInt)) 40 | } 41 | 42 | if let timeStr = value as? String { 43 | return Date(timeIntervalSince1970: TimeInterval(atof(timeStr))) 44 | } 45 | 46 | return nil 47 | } 48 | 49 | public func transformToJSON(_ value: Date?) -> Double? { 50 | if let date = value { 51 | return Double(date.timeIntervalSince1970) 52 | } 53 | return nil 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintRelatableTarget { 32 | } 33 | 34 | extension Int: ConstraintRelatableTarget { 35 | } 36 | 37 | extension UInt: ConstraintRelatableTarget { 38 | } 39 | 40 | extension Float: ConstraintRelatableTarget { 41 | } 42 | 43 | extension Double: ConstraintRelatableTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintRelatableTarget { 47 | } 48 | 49 | extension CGSize: ConstraintRelatableTarget { 50 | } 51 | 52 | extension CGPoint: ConstraintRelatableTarget { 53 | } 54 | 55 | extension ConstraintInsets: ConstraintRelatableTarget { 56 | } 57 | 58 | extension ConstraintItem: ConstraintRelatableTarget { 59 | } 60 | 61 | extension ConstraintView: ConstraintRelatableTarget { 62 | } 63 | -------------------------------------------------------------------------------- /Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchQueue+Alamofire.swift 3 | // 4 | // Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Dispatch 26 | import Foundation 27 | 28 | extension DispatchQueue { 29 | static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } 30 | static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } 31 | static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } 32 | static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } 33 | 34 | func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { 35 | asyncAfter(deadline: .now() + delay, execute: closure) 36 | } 37 | 38 | func syncResult(_ closure: () -> T) -> T { 39 | var result: T! 40 | sync { result = closure() } 41 | return result 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/NSDecimalNumberTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransformOf.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 8/22/16. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class NSDecimalNumberTransform: TransformType { 32 | public typealias Object = NSDecimalNumber 33 | public typealias JSON = String 34 | 35 | public init() {} 36 | 37 | public func transformFromJSON(_ value: Any?) -> NSDecimalNumber? { 38 | if let string = value as? String { 39 | return NSDecimalNumber(string: string) 40 | } 41 | if let double = value as? Double { 42 | return NSDecimalNumber(value: double) 43 | } 44 | return nil 45 | } 46 | 47 | public func transformToJSON(_ value: NSDecimalNumber?) -> String? { 48 | guard let value = value else { return nil } 49 | return value.description 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/LayoutConstraint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class LayoutConstraint: NSLayoutConstraint { 32 | 33 | public var label: String? { 34 | get { 35 | return self.identifier 36 | } 37 | set { 38 | self.identifier = newValue 39 | } 40 | } 41 | 42 | internal weak var constraint: Constraint? = nil 43 | 44 | } 45 | 46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { 47 | guard lhs.firstItem === rhs.firstItem && 48 | lhs.secondItem === rhs.secondItem && 49 | lhs.firstAttribute == rhs.firstAttribute && 50 | lhs.secondAttribute == rhs.secondAttribute && 51 | lhs.relation == rhs.relation && 52 | lhs.priority == rhs.priority && 53 | lhs.multiplier == rhs.multiplier else { 54 | return false 55 | } 56 | return true 57 | } 58 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 8.0, *) 32 | public struct ConstraintLayoutSupportDSL: ConstraintDSL { 33 | 34 | public var target: AnyObject? { 35 | return self.support 36 | } 37 | 38 | internal let support: ConstraintLayoutSupport 39 | 40 | internal init(support: ConstraintLayoutSupport) { 41 | self.support = support 42 | 43 | } 44 | 45 | public var top: ConstraintItem { 46 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) 47 | } 48 | 49 | public var bottom: ConstraintItem { 50 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) 51 | } 52 | 53 | public var height: ConstraintItem { 54 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintItem: Equatable { 32 | 33 | internal weak var target: AnyObject? 34 | internal let attributes: ConstraintAttributes 35 | 36 | internal init(target: AnyObject?, attributes: ConstraintAttributes) { 37 | self.target = target 38 | self.attributes = attributes 39 | } 40 | 41 | internal var view: ConstraintView? { 42 | return self.target as? ConstraintView 43 | } 44 | 45 | } 46 | 47 | public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { 48 | // pointer equality 49 | guard lhs !== rhs else { 50 | return true 51 | } 52 | 53 | // must both have valid targets and identical attributes 54 | guard let target1 = lhs.target, 55 | let target2 = rhs.target, 56 | target1 === target2 && lhs.attributes == rhs.attributes else { 57 | return false 58 | } 59 | 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIViewController+Chameleon.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Chameleon.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ChameleonEnums.h" 11 | 12 | @interface UIViewController (Chameleon) 13 | 14 | /** 15 | * Sets the color theme for the specified view controller using a primary color and the specified content style. 16 | * 17 | * @param primaryColor The primary color. 18 | * @param contentStyle The contentStyle. 19 | * 20 | * @since 2.0 21 | */ 22 | - (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor 23 | withContentStyle:(UIContentStyle)contentStyle; 24 | 25 | /** 26 | * Sets the color theme for the specified view controller using a primary color, secondary color, and the specified content style. 27 | * 28 | * @param primaryColor The primary color. 29 | * @param secondaryColor The secondary color. 30 | * @param contentStyle The contentStyle. 31 | * 32 | * @since 2.0 33 | */ 34 | - (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor 35 | withSecondaryColor:(UIColor *)secondaryColor 36 | andContentStyle:(UIContentStyle)contentStyle; 37 | 38 | /** 39 | * Sets the color theme for the specified view controller using a primary color, secondary color, font name, and the specified content style. 40 | * 41 | * @param primaryColor The primary color. 42 | * @param secondaryColor The secondary color. 43 | * @param fontName The main font to use for all text-based elements. 44 | * @param contentStyle The contentStyle. 45 | * 46 | * @since 2.0 47 | */ 48 | - (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor 49 | withSecondaryColor:(UIColor *)secondaryColor 50 | usingFontName:(NSString *)fontName 51 | andContentStyle:(UIContentStyle)contentStyle; 52 | 53 | /** 54 | * Sets the status bar style for the specified @c UIViewController and all its child controllers. 55 | * 56 | * @param statusBarStyle The style of the device's status bar. 57 | * 58 | * @note Chameleon introduces a new @c statusBarStyle called @c UIStatusBarStyleContrast. 59 | * 60 | * @since 2.0 61 | */ 62 | - (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerEditable: ConstraintMakerPriortizable { 32 | 33 | @discardableResult 34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 35 | self.description.multiplier = amount 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) 42 | } 43 | 44 | @discardableResult 45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { 46 | self.description.constant = amount.constraintOffsetTargetValue 47 | return self 48 | } 49 | 50 | @discardableResult 51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { 52 | self.description.constant = amount.constraintInsetTargetValue 53 | return self 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintPriorityTarget { 32 | 33 | var constraintPriorityTargetValue: Float { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintPriorityTarget { 38 | 39 | public var constraintPriorityTargetValue: Float { 40 | return Float(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintPriorityTarget { 46 | 47 | public var constraintPriorityTargetValue: Float { 48 | return Float(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintPriorityTarget { 54 | 55 | public var constraintPriorityTargetValue: Float { 56 | return self 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintPriorityTarget { 62 | 63 | public var constraintPriorityTargetValue: Float { 64 | return Float(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintPriorityTarget { 70 | 71 | public var constraintPriorityTargetValue: Float { 72 | return Float(self) 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/Chameleon_.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChameleonInternal.h 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/4/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import "ChameleonConstants.h" 13 | #import "ChameleonEnums.h" 14 | #import "ChameleonMacros.h" 15 | 16 | #import "NSArray+Chameleon.h" 17 | #import "UIColor+Chameleon.h" 18 | #import "UINavigationController+Chameleon.h" 19 | #import "UIViewController+Chameleon.h" 20 | 21 | @interface Chameleon : NSObject 22 | 23 | #pragma mark - Global Theming 24 | 25 | /** 26 | * Set a global theme using a primary color and the specified content style. 27 | * 28 | * @param primaryColor The primary color to theme all controllers with. 29 | * @param contentStyle The contentStyle. 30 | * 31 | * @note By default the secondary color will be a darker shade of the specified primary color. 32 | * 33 | * @since 2.0 34 | */ 35 | + (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor 36 | withContentStyle:(UIContentStyle)contentStyle; 37 | 38 | /** 39 | * Set a global theme using a primary color, secondary color, and the specified content style. 40 | * 41 | * @param primaryColor The primary color to theme all controllers with. 42 | * @param secondaryColor The secondary color to theme all controllers with. 43 | * @param contentStyle The contentStyle. 44 | * 45 | * @since 2.0 46 | */ 47 | + (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor 48 | withSecondaryColor:(UIColor *)secondaryColor 49 | andContentStyle:(UIContentStyle)contentStyle; 50 | 51 | /** 52 | * Set a global theme using a primary color, secondary color, font name, and the specified content style. 53 | * 54 | * @param primaryColor The primary color to theme all controllers with. 55 | * @param secondaryColor The secondary color to theme all controllers with. 56 | * @param fontName The default font for all text-based UI elements. 57 | * @param contentStyle The contentStyle. 58 | * 59 | * @since 2.0 60 | */ 61 | + (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor 62 | withSecondaryColor:(UIColor *)secondaryColor 63 | usingFontName:(NSString *)fontName 64 | andContentStyle:(UIContentStyle)contentStyle; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintMultiplierTarget { 32 | 33 | var constraintMultiplierTargetValue: CGFloat { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintMultiplierTarget { 38 | 39 | public var constraintMultiplierTargetValue: CGFloat { 40 | return CGFloat(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintMultiplierTarget { 46 | 47 | public var constraintMultiplierTargetValue: CGFloat { 48 | return CGFloat(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintMultiplierTarget { 54 | 55 | public var constraintMultiplierTargetValue: CGFloat { 56 | return CGFloat(self) 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintMultiplierTarget { 62 | 63 | public var constraintMultiplierTargetValue: CGFloat { 64 | return CGFloat(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintMultiplierTarget { 70 | 71 | public var constraintMultiplierTargetValue: CGFloat { 72 | return self 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintOffsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintOffsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintOffsetTarget { 38 | } 39 | 40 | extension Float: ConstraintOffsetTarget { 41 | } 42 | 43 | extension Double: ConstraintOffsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintOffsetTarget { 47 | } 48 | 49 | extension ConstraintOffsetTarget { 50 | 51 | internal var constraintOffsetTargetValue: CGFloat { 52 | let offset: CGFloat 53 | if let amount = self as? Float { 54 | offset = CGFloat(amount) 55 | } else if let amount = self as? Double { 56 | offset = CGFloat(amount) 57 | } else if let amount = self as? CGFloat { 58 | offset = CGFloat(amount) 59 | } else if let amount = self as? Int { 60 | offset = CGFloat(amount) 61 | } else if let amount = self as? UInt { 62 | offset = CGFloat(amount) 63 | } else { 64 | offset = 0.0 65 | } 66 | return offset 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardRSSFeedItem.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import ObjectMapper 20 | 21 | open class BigBoardRSSFeedItem: Mappable { 22 | 23 | fileprivate static var dateFormatter:DateFormatter? 24 | fileprivate static func sharedDateFormatter() -> DateFormatter { 25 | if dateFormatter == nil { 26 | dateFormatter = DateFormatter() 27 | dateFormatter?.dateFormat = "EEE, dd MMM yyyy HH:mm:ss zzz" 28 | } 29 | 30 | return dateFormatter! 31 | } 32 | 33 | open var title:String? 34 | open var link:String? 35 | open var guid:String? 36 | open var publicationDate:Date? 37 | open var author:String? 38 | open var thumbnailLink:String? 39 | open var description:String? 40 | open var content:String? 41 | 42 | required public init?(map: Map) { 43 | mapping(map: map) 44 | } 45 | 46 | open func mapping(map: Map) { 47 | title <- map["title"] 48 | link <- map["link"] 49 | guid <- map["guid"] 50 | author <- map["author"] 51 | thumbnailLink <- map["thumbnail"] 52 | description <- map["description"] 53 | content <- map["content"] 54 | 55 | var publicationDateString = "" 56 | publicationDateString <- map["pubDate"] 57 | 58 | publicationDate = BigBoardRSSFeedItem.sharedDateFormatter().date(from: publicationDateString) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Example/Pods/ObjectMapper/ObjectMapper/Transforms/URLTransform.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URLTransform.swift 3 | // ObjectMapper 4 | // 5 | // Created by Tristan Himmelman on 2014-10-27. 6 | // 7 | // The MIT License (MIT) 8 | // 9 | // Copyright (c) 2014-2015 Hearst 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | import Foundation 30 | 31 | open class URLTransform: TransformType { 32 | public typealias Object = URL 33 | public typealias JSON = String 34 | private let shouldEncodeURLString: Bool 35 | 36 | /** 37 | Initializes the URLTransform with an option to encode URL strings before converting them to an NSURL 38 | - parameter shouldEncodeUrlString: when true (the default) the string is encoded before passing 39 | to `NSURL(string:)` 40 | - returns: an initialized transformer 41 | */ 42 | public init(shouldEncodeURLString: Bool = true) { 43 | self.shouldEncodeURLString = shouldEncodeURLString 44 | } 45 | 46 | public func transformFromJSON(_ value: Any?) -> URL? { 47 | guard let URLString = value as? String else { return nil } 48 | 49 | if !shouldEncodeURLString { 50 | return URL(string: URLString) 51 | } 52 | 53 | guard let escapedURLString = URLString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) else { 54 | return nil 55 | } 56 | return URL(string: escapedURLString) 57 | } 58 | 59 | public func transformToJSON(_ value: URL?) -> String? { 60 | if let URL = value { 61 | return URL.absoluteString 62 | } 63 | return nil 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardChartDataModulePoint.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import ObjectMapper 20 | 21 | open class BigBoardChartDataModulePoint: Mappable { 22 | 23 | fileprivate static var dateFormatter:DateFormatter? 24 | fileprivate static func sharedDateFormatter() -> DateFormatter { 25 | if dateFormatter == nil { 26 | dateFormatter = DateFormatter() 27 | dateFormatter?.dateFormat = "yyyy-MM-dd" 28 | } 29 | 30 | return dateFormatter! 31 | } 32 | 33 | open var date:Date! 34 | open var close:Double! 35 | open var high:Double! 36 | open var low:Double! 37 | open var open:Double! 38 | open var volume:Int! 39 | 40 | required public init?(map: Map) { 41 | mapping(map: map) 42 | } 43 | 44 | open func mapping(map: Map) { 45 | date <- (map["Timestamp"], DateTransform()) 46 | close <- map["close"] 47 | high <- map["high"] 48 | low <- map["low"] 49 | open <- map["open"] 50 | volume <- map["volume"] 51 | 52 | if date == nil { 53 | var dateAsInteger = 0 54 | dateAsInteger <- map["Date"] 55 | let dateAsString = NSMutableString(string: "\(dateAsInteger)") 56 | dateAsString.insert("-", at: 4) 57 | dateAsString.insert("-", at: 7) 58 | date = BigBoardChartDataModulePoint.sharedDateFormatter().date(from: dateAsString as String)! 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Example/Pods/AlamofireImage/Source/AFIError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AFIError.swift 3 | // 4 | // Copyright (c) 2015-2016 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | /// `AFIError` is the error type returned by AlamofireImage. 28 | /// 29 | /// - requestCancelled: The request was explicitly cancelled. 30 | /// - imageSerializationFailed: Response data could not be serialized into an image. 31 | public enum AFIError: Error { 32 | case requestCancelled 33 | case imageSerializationFailed 34 | } 35 | 36 | // MARK: - Error Booleans 37 | 38 | extension AFIError { 39 | /// Returns `true` if the `AFIError` is a request cancellation error, `false` otherwise. 40 | public var isRequestCancelledError: Bool { 41 | if case .requestCancelled = self { return true } 42 | return false 43 | } 44 | 45 | /// Returns `true` if the `AFIError` is an image serialization error, `false` otherwise. 46 | public var isImageSerializationFailedError: Bool { 47 | if case .imageSerializationFailed = self { return true } 48 | return false 49 | } 50 | } 51 | 52 | // MARK: - Error Descriptions 53 | 54 | extension AFIError: LocalizedError { 55 | public var errorDescription: String? { 56 | switch self { 57 | case .requestCancelled: 58 | return "The request was explicitly cancelled." 59 | case .imageSerializationFailed: 60 | return "Response data could not be serialized into an image." 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton on 04/14/2016. 6 | // Copyright (c) 2016 Dalton. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleViewController: UIViewController, ExampleViewDelegate { 12 | 13 | var model:ExampleModel! 14 | var exampleView:ExampleView! 15 | 16 | init(){ 17 | super.init(nibName: nil, bundle: nil) 18 | edgesForExtendedLayout = UIRectEdge() 19 | model = ExampleModel() 20 | exampleView = ExampleView(delegate: self) 21 | view = exampleView 22 | title = "BigBoard" 23 | } 24 | 25 | required init?(coder aDecoder: NSCoder) { 26 | fatalError("init(coder:) has not been implemented") 27 | } 28 | 29 | override func viewWillAppear(_ animated: Bool) { 30 | super.viewWillAppear(animated) 31 | navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addStockButtonPressed)) 32 | navigationItem.rightBarButtonItem?.tintColor = UIColor.white 33 | } 34 | 35 | func addStockButtonPressed() { 36 | let addStockController = ExampleAddStockViewController { (stock:BigBoardSearchResultStock) in 37 | print("Loading stock with symbol: \(stock.symbol!)") 38 | self.model.mapStockWithSymbol(symbol: stock.symbol!, success: { 39 | print("Stock successfully mapped.") 40 | print("--------------------------") 41 | self.exampleView.stocksTableView.reloadData() 42 | }, failure: { (error) in 43 | print(error) 44 | print("--------------------------") 45 | }) 46 | } 47 | navigationController?.pushViewController(addStockController, animated: true) 48 | } 49 | 50 | // MARK: ExampleViewDelegate Implementation 51 | 52 | func numberOfStocks() -> Int { 53 | return model.numberOfStocks() 54 | } 55 | 56 | func stockAtIndex(_ index: Int) -> BigBoardStock { 57 | return model.stockAtIndex(index) 58 | } 59 | 60 | func stockSelectedAtIndex(_ index:Int) { 61 | let exampleStockDetailsModel = ExampleStockDetailsModel(stock: model.stockAtIndex(index)) 62 | let exampleStockDetailsViewController = ExampleStockDetailsViewController(model: exampleStockDetailsModel) 63 | navigationController!.pushViewController(exampleStockDetailsViewController, animated: true) 64 | } 65 | 66 | func refreshControllPulled() { 67 | model.refreshStocks(success: { 68 | self.exampleView.refreshControl.endRefreshing() 69 | self.exampleView.stocksTableView.reloadData() 70 | }) { (error) in 71 | print(error) 72 | } 73 | } 74 | 75 | } 76 | 77 | -------------------------------------------------------------------------------- /Example/Pods/Alamofire/Source/Notifications.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Notifications.swift 3 | // 4 | // Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | extension Notification.Name { 28 | /// Used as a namespace for all `URLSessionTask` related notifications. 29 | public struct Task { 30 | /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. 31 | public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") 32 | 33 | /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. 34 | public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") 35 | 36 | /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. 37 | public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") 38 | 39 | /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. 40 | public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") 41 | } 42 | } 43 | 44 | // MARK: - 45 | 46 | extension Notification { 47 | /// Used as a namespace for all `Notification` user info dictionary keys. 48 | public struct Key { 49 | /// User info dictionary key representing the `URLSessionTask` associated with the notification. 50 | public static let Task = "org.alamofire.notification.key.task" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerPriortizable: ConstraintMakerFinalizable { 32 | 33 | @discardableResult 34 | public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable { 35 | self.description.priority = amount 36 | return self 37 | } 38 | 39 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") 40 | @discardableResult 41 | public func priorityRequired() -> ConstraintMakerFinalizable { 42 | return self.priority(1000) 43 | } 44 | 45 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") 46 | @discardableResult 47 | public func priorityHigh() -> ConstraintMakerFinalizable { 48 | return self.priority(750) 49 | } 50 | 51 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") 52 | @discardableResult 53 | public func priorityMedium() -> ConstraintMakerFinalizable { 54 | #if os(iOS) || os(tvOS) 55 | return self.priority(500) 56 | #else 57 | return self.priority(501) 58 | #endif 59 | } 60 | 61 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.") 62 | @discardableResult 63 | public func priorityLow() -> ConstraintMakerFinalizable { 64 | return self.priority(250) 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /Example/BigBoard/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton on 04/14/2016. 6 | // Copyright (c) 2016 Dalton. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ChameleonFramework 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 19 | // Override point for customization after application launch. 20 | 21 | let navigationController = UINavigationController(rootViewController: ExampleViewController()) 22 | navigationController.navigationBar.barTintColor = UIColor.flatGreenColorDark() 23 | navigationController.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.white] 24 | 25 | window = UIWindow(frame: UIScreen.main.bounds) 26 | window?.rootViewController = navigationController 27 | window?.makeKeyAndVisible() 28 | return true 29 | } 30 | 31 | func applicationWillResignActive(_ application: UIApplication) { 32 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 33 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 34 | } 35 | 36 | func applicationDidEnterBackground(_ application: UIApplication) { 37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | func applicationWillEnterForeground(_ application: UIApplication) { 42 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 43 | } 44 | 45 | func applicationDidBecomeActive(_ application: UIApplication) { 46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 47 | } 48 | 49 | func applicationWillTerminate(_ application: UIApplication) { 50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 51 | } 52 | 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintDescription.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintDescription { 32 | 33 | internal let view: ConstraintView 34 | internal var attributes: ConstraintAttributes 35 | internal var relation: ConstraintRelation? = nil 36 | internal var sourceLocation: (String, UInt)? = nil 37 | internal var label: String? = nil 38 | internal var related: ConstraintItem? = nil 39 | internal var multiplier: ConstraintMultiplierTarget = 1.0 40 | internal var constant: ConstraintConstantTarget = 0.0 41 | internal var priority: ConstraintPriorityTarget = 1000.0 42 | internal lazy var constraint: Constraint? = { 43 | guard let relation = self.relation, 44 | let related = self.related, 45 | let sourceLocation = self.sourceLocation else { 46 | return nil 47 | } 48 | let from = ConstraintItem(target: self.view, attributes: self.attributes) 49 | 50 | return Constraint( 51 | from: from, 52 | to: related, 53 | relation: relation, 54 | sourceLocation: sourceLocation, 55 | label: self.label, 56 | multiplier: self.multiplier, 57 | constant: self.constant, 58 | priority: self.priority 59 | ) 60 | }() 61 | 62 | // MARK: Initialization 63 | 64 | internal init(view: ConstraintView, attributes: ConstraintAttributes) { 65 | self.view = view 66 | self.attributes = attributes 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardChartDataModule.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import ObjectMapper 20 | 21 | public enum BigBoardChartDataModuleRange : String { 22 | case OneDay = "1d" 23 | case FiveDay = "5d" 24 | case OneMonth = "1m" 25 | case ThreeMonth = "3m" 26 | case OneYear = "1y" 27 | case FiveYear = "5y" 28 | case Lifetime = "max" 29 | } 30 | 31 | open class BigBoardChartDataModule: Mappable { 32 | 33 | fileprivate static var dateFormatter:DateFormatter? 34 | fileprivate static func sharedDateFormatter() -> DateFormatter { 35 | if dateFormatter == nil { 36 | dateFormatter = DateFormatter() 37 | dateFormatter?.dateFormat = "yyyy-MM-dd" 38 | } 39 | 40 | return dateFormatter! 41 | } 42 | 43 | open var dates:[Date]! 44 | open var dataPoints:[BigBoardChartDataModulePoint]! 45 | 46 | required public init?(map: Map) { 47 | mapping(map: map) 48 | } 49 | 50 | open func mapping(map: Map) { 51 | dates = [] 52 | dataPoints <- map["series"] 53 | 54 | var labels:[Int] = [] 55 | labels <- map["labels"] 56 | 57 | let firstLabelInt = labels.first! 58 | let firstLabelString = "\(firstLabelInt)" 59 | 60 | if firstLabelString.characters.count > 8 { 61 | dates <- (map["labels"], DateTransform()) 62 | } else { 63 | for label in labels { 64 | let dateAsString = NSMutableString(string: "\(label)") 65 | dateAsString.insert("-", at: 4) 66 | dateAsString.insert("-", at: 7) 67 | dates.append(BigBoardChartDataModule.sharedDateFormatter().date(from: dateAsString as String)!) 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Example/Pods/ChameleonFramework/Pod/Classes/Objective-C/UIImage+ChameleonPrivate.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ChameleonPrivate.m 3 | // Chameleon 4 | // 5 | // Created by Vicc Alexander on 6/8/15. 6 | // Copyright (c) 2015 Vicc Alexander. All rights reserved. 7 | // 8 | 9 | #import "UIImage+ChameleonPrivate.h" 10 | 11 | @implementation UIImage (ChameleonPrivate) 12 | 13 | // Would not have been possible without - http://stackoverflow.com/a/1262893 14 | + (UIColor *)colorFromImage:(UIImage *)image atPoint:(CGPoint)point { 15 | 16 | //Encapsulate our image 17 | CGImageRef imageRef = image.CGImage; 18 | NSUInteger width = CGImageGetWidth(imageRef); 19 | NSUInteger height = CGImageGetHeight(imageRef); 20 | 21 | //Specify the colorspace we're in 22 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 23 | 24 | //Extract the data we need 25 | unsigned char *rawData = calloc(height * width * 4, sizeof(unsigned char)); 26 | NSUInteger bytesPerPixel = 4; 27 | NSUInteger bytesPerRow = bytesPerPixel * width; 28 | NSUInteger bitsPerComponent = 8; 29 | CGContextRef context = CGBitmapContextCreate(rawData, width, height, bitsPerComponent, bytesPerRow, 30 | colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); 31 | //Release colorspace 32 | CGColorSpaceRelease(colorSpace); 33 | 34 | //Draw and release image 35 | CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef); 36 | CGContextRelease(context); 37 | 38 | //rawData now contains the image data in RGBA8888 39 | NSInteger byteIndex = (bytesPerRow * point.y) + (point.x * bytesPerPixel); 40 | 41 | //Define our RGBA values 42 | CGFloat red = (rawData[byteIndex] * 1.f) / 255.f; 43 | CGFloat green = (rawData[byteIndex + 1] * 1.f) / 255.f; 44 | CGFloat blue = (rawData[byteIndex + 2] * 1.f) / 255.f; 45 | CGFloat alpha = (rawData[byteIndex + 3] * 1.0) / 255.f; 46 | 47 | //Free our rawData 48 | free(rawData); 49 | 50 | //Return color 51 | return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; 52 | } 53 | 54 | + (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize { 55 | 56 | UIGraphicsBeginImageContextWithOptions(newSize, NO, 1.0); 57 | [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; 58 | UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); 59 | UIGraphicsEndImageContext(); 60 | return newImage; 61 | } 62 | 63 | #pragma mark - Instance Methods 64 | 65 | - (UIImage *)imageScaledToSize:(CGSize)newSize { 66 | 67 | UIGraphicsBeginImageContextWithOptions(newSize, NO, 1.0); 68 | [self drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; 69 | UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); 70 | UIGraphicsEndImageContext(); 71 | return newImage; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintInsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintInsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintInsetTarget { 38 | } 39 | 40 | extension Float: ConstraintInsetTarget { 41 | } 42 | 43 | extension Double: ConstraintInsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintInsetTarget { 47 | } 48 | 49 | extension ConstraintInsets: ConstraintInsetTarget { 50 | } 51 | 52 | extension ConstraintInsetTarget { 53 | 54 | internal var constraintInsetTargetValue: ConstraintInsets { 55 | if let amount = self as? ConstraintInsets { 56 | return amount 57 | } else if let amount = self as? Float { 58 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 59 | } else if let amount = self as? Double { 60 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 61 | } else if let amount = self as? CGFloat { 62 | return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount) 63 | } else if let amount = self as? Int { 64 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 65 | } else if let amount = self as? UInt { 66 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 67 | } else { 68 | return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0) 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /Pod/Classes/UIImageView+BigBoard.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | // UIKit is only available in iOS, not on OSX. 20 | // Do not import this file if platform is OSX 21 | 22 | #if os(iOS) 23 | import UIKit 24 | import Alamofire 25 | import AlamofireImage 26 | 27 | public extension UIImageView { 28 | 29 | /* 30 | Asynchronously loads and sets the image property with a graph image for a given stock 31 | @param stock: Stock you want to load the graph for 32 | @param timelineInMonths: How far in months you want the data of the graph image to display (Default value is 3 months) 33 | @param movingAverageTrendlineDays: Trendlines in days you want for the data of the graph image. For example, if you specify [5,50], 34 | then the image that is loaded will have both a 5 day moving average trendline and a 50 day moving 35 | average trendline. 36 | 37 | */ 38 | 39 | public func setGraphAsImageForStock(stock:BigBoardStock, timelineInMonths:Int = 3, movingAverageTrendlineDays:[Int]? = nil, failure:((BigBoardError) -> Void)?) { 40 | 41 | let urlString = BigBoardUrlCreator.urlForGraphImage(stock: stock, timelineInMonths: timelineInMonths, movingAverageTrendlineDays: movingAverageTrendlineDays) 42 | 43 | Alamofire.request(urlString).validate().responseImage { (response:DataResponse) in 44 | 45 | switch response.result { 46 | case .success: 47 | if let image = response.result.value { 48 | self.contentMode = .scaleAspectFit 49 | self.image = image 50 | } 51 | case .failure(let error): 52 | if let failure = failure { 53 | failure(BigBoardError(nsError: error as NSError)) 54 | } 55 | } 56 | } 57 | } 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleView.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/18/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SnapKit 11 | 12 | protocol ExampleViewDelegate : class { 13 | func numberOfStocks() -> Int 14 | func stockAtIndex(_ index:Int) -> BigBoardStock 15 | func stockSelectedAtIndex(_ index:Int) 16 | func refreshControllPulled() 17 | } 18 | 19 | class ExampleView: UIView, UITableViewDataSource, UITableViewDelegate { 20 | 21 | weak var delegate:ExampleViewDelegate? 22 | var stocksTableView:UITableView! 23 | var refreshControl:UIRefreshControl! 24 | 25 | init(delegate:ExampleViewDelegate){ 26 | super.init(frame: CGRect.zero) 27 | self.delegate = delegate 28 | self.backgroundColor = UIColor.white 29 | 30 | stocksTableView = UITableView(frame: CGRect.zero, style: .plain) 31 | stocksTableView.dataSource = self 32 | stocksTableView.delegate = self 33 | stocksTableView.rowHeight = 50.0 34 | addSubview(stocksTableView) 35 | 36 | refreshControl = UIRefreshControl() 37 | refreshControl.addTarget(self, action: #selector(refreshControllerPulled), for: .valueChanged) 38 | stocksTableView.addSubview(refreshControl) 39 | 40 | stocksTableView.snp.makeConstraints { (make) in 41 | make.edges.equalTo(self) 42 | } 43 | } 44 | 45 | required init?(coder aDecoder: NSCoder) { 46 | fatalError("init(coder:) has not been implemented") 47 | } 48 | 49 | func refreshControllerPulled(){ 50 | delegate!.refreshControllPulled() 51 | } 52 | 53 | // MARK: UITableViewDataSource and UITableViewDataSource Implementation 54 | 55 | func numberOfSections(in tableView: UITableView) -> Int { 56 | return 1 57 | } 58 | 59 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 60 | return delegate!.numberOfStocks() 61 | } 62 | 63 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 64 | 65 | let reuseIdentifier = "ExampleCell" 66 | 67 | var cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier) as UITableViewCell? 68 | 69 | if cell == nil { 70 | cell = UITableViewCell(style: .subtitle, reuseIdentifier: reuseIdentifier) 71 | let currentPriceLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 150, height: 25)) 72 | currentPriceLabel.textAlignment = .right 73 | cell?.accessoryView = currentPriceLabel 74 | } 75 | 76 | return cell! 77 | } 78 | 79 | func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { 80 | let stock = delegate!.stockAtIndex((indexPath as NSIndexPath).row) 81 | cell.textLabel?.text = stock.name! 82 | cell.detailTextLabel?.text = stock.symbol! 83 | let currentPriceLabel = cell.accessoryView as! UILabel! 84 | currentPriceLabel?.text = "$\(stock.lastTradePriceOnly!)" 85 | } 86 | 87 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 88 | tableView.deselectRow(at: indexPath, animated: false) 89 | delegate!.stockSelectedAtIndex((indexPath as NSIndexPath).row) 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /Example/BigBoard/ExampleStockDetailsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleStockDetailsView.swift 3 | // BigBoard 4 | // 5 | // Created by Dalton Hinterscher on 5/18/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol ExampleStockDetailsViewDelegate : class { 12 | func numberOfRSSFeedItems() -> Int 13 | func rssFeedItemAtIndex(_ index:Int) -> BigBoardRSSFeedItem 14 | func rssFeedItemSelectedAtIndex(_ index:Int) 15 | } 16 | 17 | class ExampleStockDetailsView: UIView, UITableViewDataSource, UITableViewDelegate { 18 | 19 | weak var delegate:ExampleStockDetailsViewDelegate? 20 | var graphImageView:UIImageView! 21 | var rssFeedTableView:UITableView! 22 | 23 | init(delegate:ExampleStockDetailsViewDelegate) { 24 | super.init(frame: CGRect.zero) 25 | self.backgroundColor = UIColor.white 26 | self.delegate = delegate 27 | 28 | graphImageView = UIImageView() 29 | graphImageView.backgroundColor = UIColor.white 30 | addSubview(graphImageView) 31 | 32 | graphImageView.snp.makeConstraints { (make) in 33 | make.top.equalTo(self).offset(20) 34 | make.left.equalTo(self) 35 | make.right.equalTo(self) 36 | make.height.equalTo(self).multipliedBy(0.25) 37 | } 38 | 39 | rssFeedTableView = UITableView(frame: CGRect.zero, style: .grouped) 40 | rssFeedTableView.dataSource = self 41 | rssFeedTableView.delegate = self 42 | rssFeedTableView.rowHeight = 100.0 43 | addSubview(rssFeedTableView) 44 | 45 | rssFeedTableView.snp.makeConstraints { (make) in 46 | make.top.equalTo(graphImageView.snp.bottom) 47 | make.left.equalTo(self) 48 | make.right.equalTo(self) 49 | make.bottom.equalTo(self) 50 | } 51 | } 52 | 53 | required init?(coder aDecoder: NSCoder) { 54 | fatalError("init(coder:) has not been implemented") 55 | } 56 | 57 | // MARK: UITableViewDataSource and UITableViewDataSource Implementation 58 | 59 | func numberOfSections(in tableView: UITableView) -> Int { 60 | return 1 61 | } 62 | 63 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 64 | return delegate!.numberOfRSSFeedItems() 65 | } 66 | 67 | func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { 68 | return 0.0001 69 | } 70 | 71 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 72 | 73 | let reuseIdentifier = "ExampleCell" 74 | 75 | var cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier) as UITableViewCell? 76 | 77 | if cell == nil { 78 | cell = UITableViewCell(style: .subtitle, reuseIdentifier: reuseIdentifier) 79 | cell?.textLabel?.numberOfLines = 2 80 | cell?.detailTextLabel?.numberOfLines = 0 81 | } 82 | 83 | return cell! 84 | } 85 | 86 | func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { 87 | let feedItem = delegate!.rssFeedItemAtIndex((indexPath as NSIndexPath).row) 88 | cell.textLabel?.text = feedItem.title! 89 | cell.detailTextLabel?.text = feedItem.description! 90 | } 91 | 92 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 93 | tableView.deselectRow(at: indexPath, animated: false) 94 | delegate!.rssFeedItemSelectedAtIndex((indexPath as NSIndexPath).row) 95 | } 96 | 97 | 98 | } 99 | -------------------------------------------------------------------------------- /Pod/Classes/BigBoardError.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | Copyright (c) 2016 Dalton Hinterscher 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 14 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 15 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | */ 18 | 19 | import Foundation 20 | 21 | public enum BigBoardErrorType { 22 | case MappingFutureDate 23 | case RequestTimedOut 24 | case InvalidStockSymbol 25 | case StartDateGreaterThanEndDate 26 | case StockMarketIsClosedInGivenDateRange 27 | case Unknown 28 | } 29 | 30 | enum BigBoardErrorMessage : String { 31 | case MappingFutureDate = "You are trying to map historical data for a future date." 32 | case StartDateGreaterThanEndDate = "Your start date is greater than your end date. Your start date must take place or be equal to your end date." 33 | case StockMarketIsClosedInGivenDateRange = "Your start and end dates are pointing to dates when the stock market is closed. No historical data exists for these dates." 34 | case StockDoesNotExist = "You are trying to map historical data for a stock that does not exist." 35 | } 36 | 37 | open class BigBoardError: NSObject { 38 | 39 | fileprivate let ERROR_PREFIX = "BigBoardError:" 40 | 41 | override open var description: String { 42 | return "\(ERROR_PREFIX) \(errorMessage!)" 43 | } 44 | 45 | private(set) open var type:BigBoardErrorType! 46 | private(set) open var errorMessage:String! 47 | 48 | init(invalidSymbol:String) { 49 | super.init() 50 | type = .InvalidStockSymbol 51 | errorMessage = "\(invalidSymbol.uppercased()) is not a real stock." 52 | } 53 | 54 | init(invalidSymbols:[String]) { 55 | super.init() 56 | type = .InvalidStockSymbol 57 | if invalidSymbols.count > 1 { 58 | errorMessage = "\(invalidSymbols.joined(separator: ", ")) are not real stocks." 59 | } else { 60 | errorMessage = "\(invalidSymbols.first!.uppercased()) is not a real stock." 61 | } 62 | } 63 | 64 | init(nsError:NSError) { 65 | super.init() 66 | errorMessage = nsError.localizedDescription 67 | 68 | if (nsError.code == NSURLErrorTimedOut) { 69 | type = .RequestTimedOut 70 | } else { 71 | type = .Unknown 72 | } 73 | } 74 | 75 | init(errorMessageType:BigBoardErrorMessage) { 76 | super.init() 77 | self.errorMessage = errorMessageType.rawValue 78 | 79 | switch errorMessageType { 80 | case .MappingFutureDate: type = .MappingFutureDate 81 | case .StartDateGreaterThanEndDate: type = .StartDateGreaterThanEndDate 82 | case .StockMarketIsClosedInGivenDateRange: type = .StockMarketIsClosedInGivenDateRange 83 | case .StockDoesNotExist: type = .InvalidStockSymbol 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Example/BigBoard/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | --------------------------------------------------------------------------------