Skip to content

Commit 1e4a024

Browse files
committed
fixed the cell bug
1 parent 14d3650 commit 1e4a024

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Time/TimerStopwatch/Main.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Naf-OP-4Rq">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Naf-OP-4Rq">
33
<dependencies>
44
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
55
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>

Time/TimerStopwatch/StopWatchViewController.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ @implementation StopWatchViewController
1616

1717
-(void)viewDidLoad{
1818
[super viewDidLoad];
19+
self.lapsTableView.delegate = self;
20+
self.lapsTableView.dataSource=self;
1921
self.heldLapsForTableView = [[NSMutableArray alloc] init];
2022
}
2123

@@ -65,8 +67,13 @@ - (IBAction)buttonTapped:(id)sender {
6567
}
6668

6769
else if (sender == self.addLapToTableView){
70+
6871
[self.heldLapsForTableView addObject:self.timeLabel.text];
69-
[self.lapsTableView reloadData];
72+
73+
74+
[self.lapsTableView reloadData];
75+
76+
NSLog(@"added lap");
7077
}
7178
}
7279
- (void)timerFired:(NSTimer*)timer {

0 commit comments

Comments
 (0)