This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)wrangleData { | |
NSMutableArray *wrangledData = [[NSMutableArray alloc] init]; | |
// Read model data into blocks and into wrangledData | |
// Communicate service state | |
switch (self.teamService.serviceState) { | |
case ASPServiceStatePreLoad : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface ASPFantasyHomeViewController () | |
@property (nonatomic, strong) ASPFantasyHomeDataWrangler *dataWrangler; | |
@end | |
@implementation ASPFantasyHomeViewController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef NS_ENUM(NSUInteger, ASPWrangledDataBlockType) | |
{ | |
ASPWrangledDataBlockTypeLoading, | |
ASPWrangledDataBlockTypeLoadError, | |
ASPWrangledDataBlockTypeNoData, | |
ASPWrangledDataBlockTypePlaceholder, | |
ASPWrangledDataBlockTypeCustom, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (void)registerLoadingLifecycleCellNibsForReuseIdentifiers:(UITableView *)tableView | |
{ | |
[tableView registerNib:[UINib nibWithNibName:@"LoadingCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:ASPTableCellUtilLoadingCellName]; | |
[tableView registerNib:[UINib nibWithNibName:@"LoadErrorCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:ASPTableCellUtilLoadErrorCellName]; | |
[tableView registerNib:[UINib nibWithNibName:@"NoDataCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:ASPTableCellUtilNoDataCellName]; | |
[tableView registerNib:[UINib nibWithNibName:@"PlaceholderCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:ASPTableCellUtilPlaceholderCellName]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppearanceManager.swift | |
// | |
// Created by Ben Dalziel on 2/17/16. | |
// | |
import UIKit | |
class AppearanceManager { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum AppColors: String { | |
case Beige = "#f5efe0", | |
Gold = "#cda582", | |
FMLRed = "#fa463c", | |
BlackVelvet = "#1e0a14", | |
DarkVelvet = "#321e28", | |
Velvet = "#4a283e", //503146", | |
// Alternate colors - use sparingly | |
FMLRedAlt = "#e14137", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public indirect enum AppUIColors: Int { | |
case NavBarBackground, | |
NavBarTint, | |
NavBarShadow, | |
NavBarTitle, | |
PickerNavBarBackground, | |
PickerNavBarTint, | |
PickerNavBarTitle, | |
PickerNavBarTitleAlt, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class func uiColor(appUIColor: AppUIColors) -> UIColor { | |
switch appUIColor { | |
case .NavBarBackground, | |
.ViewControllerBackground: // References to color abbreviated | |
return color(AppColors.Beige) | |
case .ButtonTitleSelected, | |
.ButtonTitleHighlighted: // References to color abbreviated | |
return colorWithAlpha(AppColors.Beige, alpha: 0.7) | |
case .NavBarShadow, | |
.TableSeparator: // References to color abbreviated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (CGFloat)getSpacing:(ASPSpacingSize)size traitCollection:(UITraitCollection *)contextTraitCollection { | |
bool isCompact = !(contextTraitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular); | |
switch (size) { | |
case ASPSpacingSizeTiny : | |
return (isCompact) ? 8.0f : 16.0f; | |
case ASPSpacingSizeSmall : | |
return (isCompact) ? 16.0f : 24.0f; | |
case ASPSpacingSizeLarge : | |
return (isCompact) ? 24.0f : 48.0f; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (CGFloat)getUIFontSize:(ASPUITextStyle)style traitCollection:(UITraitCollection *)contextTraitCollection { | |
bool isCompact = !(contextTraitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular); | |
CGFloat pointSize = (isCompact) ? 14.0f : 18.0f; | |
switch (style) { | |
case ASPUIElementStyleTitle1 : | |
pointSize = (isCompact) ? 36.0f : 36.0f; | |
break; |