Remove rbenv and any rubies, gems etc.:
$ rm -rf ~/.rbenv
Uninstall rbenv if installed via Homebrew
$ brew uninstall rbenv
Remove references to rbenv in ~/.bash_profile
etc.
- (id)init { | |
self = [super initWithStyle:UITableViewStyleGrouped]; | |
return self; | |
} |
- (id)init { | |
self = [super initWithStyle:UITableViewStyleGrouped]; | |
if (self) { | |
// add the handler to the UITableView | |
[[self tableView] addPullToRefreshWithActionHandler:^{ | |
// do something, in this case add a new item to our data source | |
[self addNewItem:nil]; | |
// tell pull-to-refresh to stop animating | |
[[[self tableView] pullToRefreshView] stopAnimating]; | |
}]; |
// | |
// CACoreData.h | |
// Alisto | |
// | |
// Created by Chris Aves on 09/05/2012. | |
// Copyright (c) 2012 Junctionbox Media. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
+ (NSFetchedResultsController *)fetchedResultsController:(id <NSFetchedResultsControllerDelegate>)delegate { | |
NSManagedObjectContext *context = [CACoreData sharedManagedObjectContext]; | |
NSFetchRequest *request = [[NSFetchRequest alloc] init]; | |
[request setEntity:[NSEntityDescription entityForName:@"MyModel" inManagedObjectContext:context]]; | |
// must have a sort key | |
NSSortDescriptor *anySortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"someSortKey" ascending:YES]; | |
[request setSortDescriptors:[NSArray arrayWithObjects:anySortDescriptor, nil]]; |
#import <UIKit/UIKit.h> | |
@interface SettingsViewController : UITableViewController | |
typedef enum { | |
AlistoPrefKeyTypeShowTaskNumbers = 0, | |
AlistoPrefKeyConfirmDeletion = 1 | |
} AlistoPrefKeyType; | |
@property (nonatomic, retain) IBOutlet UITableViewCell *showTaskNumbersCell; |
- (void)setWithTaskItem:(TaskItem *)task { | |
// set the text which displays the title of the task | |
NSString *text = [task title]; | |
UILabel *titleLabel = [self taskTitleLabel]; | |
[titleLabel setText:text]; | |
// create a checkbox appropriately set according whether the task is completed or not | |
NSString *completedString = @""; | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
TaskItem *task = [fetchedResultsController objectAtIndexPath:indexPath]; | |
TaskItemCell *cell; | |
// check display settings | |
if ([[NSUserDefaults standardUserDefaults] boolForKey:[NSString stringWithFormat:@"%d", AlistoPrefKeyTypeShowTaskNumbers]]) { | |
cell = [tableView dequeueReusableCellWithIdentifier:@"TaskItemCellWithID"]; | |
} else { | |
cell = [tableView dequeueReusableCellWithIdentifier:@"TaskItemCell"]; |
- (void)deleteCompletedTasksWithConfirmation:(id)sender { | |
if ([[NSUserDefaults standardUserDefaults] boolForKey:[NSString stringWithFormat:@"%d", AlistoPrefKeyConfirmDeletion]]) { | |
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Delete completed tasks?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete tasks" otherButtonTitles:nil]; | |
[sheet showFromToolbar:[[self navigationController] toolbar]]; | |
} else { | |
[self deleteCompletedTasks]; | |
} | |
} |
Remove rbenv and any rubies, gems etc.:
$ rm -rf ~/.rbenv
Uninstall rbenv if installed via Homebrew
$ brew uninstall rbenv
Remove references to rbenv in ~/.bash_profile
etc.
name: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
tests: |