Skip to content

Commit

Permalink
through Chapter 9 Section 5
Browse files Browse the repository at this point in the history
  • Loading branch information
boblmartens committed Mar 31, 2013
1 parent 5a7fb16 commit 91f102a
Show file tree
Hide file tree
Showing 7 changed files with 235 additions and 29 deletions.
6 changes: 6 additions & 0 deletions OneThing.xcodeproj/project.pbxproj
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
C4484E9F1707ECC600ACF36F /* DSEInputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4484E9E1707ECC600ACF36F /* DSEInputViewController.m */; };
C4484EA21707F24600ACF36F /* DSEEventCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C4484EA11707F24600ACF36F /* DSEEventCell.m */; };
C481C1811706282F00AF9EBB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C481C1801706282F00AF9EBB /* UIKit.framework */; };
C481C1831706282F00AF9EBB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C481C1821706282F00AF9EBB /* Foundation.framework */; };
C481C1851706282F00AF9EBB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C481C1841706282F00AF9EBB /* CoreGraphics.framework */; };
Expand All @@ -29,6 +30,8 @@
/* Begin PBXFileReference section */
C4484E9D1707ECC600ACF36F /* DSEInputViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSEInputViewController.h; sourceTree = "<group>"; };
C4484E9E1707ECC600ACF36F /* DSEInputViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSEInputViewController.m; sourceTree = "<group>"; };
C4484EA01707F24600ACF36F /* DSEEventCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSEEventCell.h; sourceTree = "<group>"; };
C4484EA11707F24600ACF36F /* DSEEventCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSEEventCell.m; sourceTree = "<group>"; };
C481C17D1706282F00AF9EBB /* OneThing.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OneThing.app; sourceTree = BUILT_PRODUCTS_DIR; };
C481C1801706282F00AF9EBB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
C481C1821706282F00AF9EBB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -114,6 +117,8 @@
C481C1891706282F00AF9EBB /* Supporting Files */,
C4484E9D1707ECC600ACF36F /* DSEInputViewController.h */,
C4484E9E1707ECC600ACF36F /* DSEInputViewController.m */,
C4484EA01707F24600ACF36F /* DSEEventCell.h */,
C4484EA11707F24600ACF36F /* DSEEventCell.m */,
);
path = OneThing;
sourceTree = "<group>";
Expand Down Expand Up @@ -207,6 +212,7 @@
C481C1A81706282F00AF9EBB /* DSEDetailViewController.m in Sources */,
C481C1B0170628D500AF9EBB /* Event.m in Sources */,
C4484E9F1707ECC600ACF36F /* DSEInputViewController.m in Sources */,
C4484EA21707F24600ACF36F /* DSEEventCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file not shown.
15 changes: 15 additions & 0 deletions OneThing/DSEEventCell.h
@@ -0,0 +1,15 @@
//
// DSEEventCell.h
// OneThing
//
// Created by Bob Martens on 3/30/13.
// Copyright (c) 2013 Deck78. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface DSEEventCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descriptionLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@end
13 changes: 13 additions & 0 deletions OneThing/DSEEventCell.m
@@ -0,0 +1,13 @@
//
// DSEEventCell.m
// OneThing
//
// Created by Bob Martens on 3/30/13.
// Copyright (c) 2013 Deck78. All rights reserved.
//

#import "DSEEventCell.h"

@implementation DSEEventCell

@end
9 changes: 6 additions & 3 deletions OneThing/DSEMasterViewController.m
Expand Up @@ -9,6 +9,7 @@
#import "DSEMasterViewController.h"
#import "DSEDetailViewController.h"
#import "DSEInputViewController.h"
#import "DSEEventCell.h"
#import "Event.h"

@interface DSEMasterViewController ()
Expand Down Expand Up @@ -74,7 +75,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
DSEEventCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
[self configureCell:cell atIndexPath:indexPath];
return cell;
}
Expand Down Expand Up @@ -224,10 +225,12 @@ - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller
}
*/

- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath
- (void)configureCell:(DSEEventCell *)cell atIndexPath:(NSIndexPath *)indexPath
{
Event *event = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.textLabel.text = event.title;
cell.titleLabel.text = event.title;
cell.descriptionLabel.text = event.eventDescription;
cell.dateLabel.text = [event.timeStamp description];
}

@end

0 comments on commit 91f102a

Please sign in to comment.