Skip to content

Commit

Permalink
update table view delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
100mango committed Apr 17, 2015
1 parent 653fc65 commit f78f8c7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions QRCatcher/QRURLViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "AppDelegate.h"
#import "QRURLTableViewCell.h"
#import "URLEntity.h"
#import "NSString+Tools.h"

@interface QRURLViewController ()<UITableViewDataSource,UITableViewDelegate,NSFetchedResultsControllerDelegate>

Expand Down Expand Up @@ -82,6 +83,13 @@ - (void)configureCell:(QRURLTableViewCell *)cell atIndexPath:(NSIndexPath *)inde
}

#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
URLEntity *record = [self.fetchedResultsController objectAtIndexPath:indexPath];
[[UIApplication sharedApplication] openURL:[NSString HTTPURLFromString:record.url]];
}



- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
Expand All @@ -98,6 +106,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd
}
}


#pragma mark - NSFetchedResultsController delegate

- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller
Expand Down

0 comments on commit f78f8c7

Please sign in to comment.