This file contains hidden or 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
// | |
// ViewController.m | |
// test | |
// | |
// Created by Joshua Howland on 11/21/14. | |
// Copyright (c) 2014 Wired In LLC. All rights reserved. | |
// | |
#import “ViewController.h” |
This file contains hidden or 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
self.tableView.rowHeight = UITableViewAutomaticDimension; | |
self.tableView.estimatedRowHeight = 60.0; |
This file contains hidden or 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
if ([[equation substringToIndex:1] isEqualToString:@"+"]) { | |
equation = [equation substringFromIndex:1]; | |
} | |
NSExpression *equationExpression = [NSExpression expressionWithFormat:equation]; | |
NSNumber *equationNumber = [equationExpression expressionValueWithObject:nil context:nil]; |
This file contains hidden or 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
if (![[array1 valueForKey:@"uniqueId"] isEqualToArray:[array2 valueForKey:@"uniqueId"]]) { | |
// The arrays contain the same objects that each have an attribute of "uniqueId" | |
} |
This file contains hidden or 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
#pragma mark - Keyboard Management | |
- (void)registerForKeyboardNotifications { | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; | |
} | |
- (void)keyboardWillShow: (NSNotification*) aNotification { | |
NSDictionary* info = [aNotification userInfo]; |
This file contains hidden or 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)setUpBottomToolbar { | |
self.navigationController.toolbar.tintColor = [UIColor orangeColor]; | |
self.navigationController.toolbarHidden = NO; | |
self.viewPlayOrHistory = [[UISegmentedControl alloc] initWithItems:@[@"Standard", @"History"]]; | |
self.viewPlayOrHistory.selectedSegmentIndex = 0; | |
UIBarButtonItem *viewSwitchButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.viewPlayOrHistory]; | |
[self.viewPlayOrHistory addTarget:self action:@selector(switchViewToPlayOrHistory) forControlEvents:UIControlEventValueChanged]; | |
UIBarButtonItem *spaceItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; |
This file contains hidden or 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
+ (NSDictionary *)getMultipleValuesForPerson:(ABRecordRef)person forProperty:(ABPropertyID)property sanitizeToNumbers:(BOOL)sanitize { | |
NSMutableDictionary *mutableValuesWithLabels = [NSMutableDictionary dictionary]; | |
ABMultiValueRef values = ABRecordCopyValue(person, property); | |
if (values && ABMultiValueGetCount(values) > 0) | |
{ | |
for (CFIndex index = 0; index < ABMultiValueGetCount(values); index++) { | |
NSString *label = CFBridgingRelease(ABMultiValueCopyLabelAtIndex(values, index)); | |
NSString *value = CFBridgingRelease(ABMultiValueCopyValueAtIndex(values, index)); | |
if (sanitize) { | |
value = [[value componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""]; |
This file contains hidden or 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
#import <Foundation/Foundation.h> | |
#import <CoreData/CoreData.h> | |
@interface DXListTableViewDataSource : NSObject <UITableViewDataSource> | |
@property (nonatomic, strong) NSFetchedResultsController *fetchedResultsController; | |
- (void)registerTableView:(UITableView *)tableView; | |
- (void)configureFetchedResultsControllerForTableView:(UITableView *)tableView; |
This file contains hidden or 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
// | |
// FillingSegmentedCircleView.h | |
// Created by Ben Norris on 2/20/15. | |
// Copyright (c) 2015 BSN Design. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface FillingSegmentedCircleView : UIView |