Skip to content

Commit

Permalink
Minor renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenofex committed Jan 17, 2012
1 parent 61314bc commit d297224
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion StreamView/EKViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
{
NSMutableArray *randomHeights;
}
@property (retain, nonatomic) IBOutlet EKStreamView *waterfall;
@property (retain, nonatomic) IBOutlet EKStreamView *stream;

@end
20 changes: 8 additions & 12 deletions StreamView/EKViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
#import "MyCell.h"

@implementation EKViewController
@synthesize waterfall;
@synthesize stream;

- (void)dealloc {
- (void)dealloc
{
[randomHeights release];
[waterfall release];
[stream release];
[super dealloc];
}

Expand All @@ -38,12 +39,12 @@ - (void)viewDidLoad
[randomHeights addObject:[NSNumber numberWithFloat:h]];
}

[waterfall reloadData];
[stream reloadData];
}

- (void)viewDidUnload
{
[self setWaterfall:nil];
[self setStream:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
Expand Down Expand Up @@ -72,7 +73,7 @@ - (UIView *)cellForStreamView:(EKStreamView *)streamView atIndex:(NSInteger)inde
static NSString *CellID2 = @"MyCell2";

BOOL redCell = index % 3 == 0;
NSString *CellID = CellID1;
NSString *CellID = redCell ? CellID2 : CellID1;

MyCell *cell;

Expand All @@ -81,7 +82,7 @@ - (UIView *)cellForStreamView:(EKStreamView *)streamView atIndex:(NSInteger)inde
if (cell == nil) {
cell = [[[MyCell alloc] initWithFrame:CGRectMake(0, 0, 100, 100)] autorelease];
cell.reuseIdentifier = CellID;
// if (redCell) cell.label.textColor = [UIColor redColor];
if (redCell) cell.label.textColor = [UIColor redColor];
}

cell.label.text = [NSString stringWithFormat:@"%d",index];
Expand All @@ -94,9 +95,4 @@ - (CGFloat)streamView:(EKStreamView *)streamView heightForCellAtIndex:(NSInteger
return [[randomHeights objectAtIndex:index] floatValue];
}

- (void)streamView:(EKStreamView *)streamView setContentForCell:(MyCell *)cell atIndex:(NSInteger)index
{
cell.label.text = [NSString stringWithFormat:@"%d",index];
}

@end
32 changes: 27 additions & 5 deletions StreamView/EKViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
<string>IBUIScrollView</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
Expand All @@ -32,21 +32,24 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="774585933">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIScrollView" id="442277849">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:190</string>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="442277849"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
Expand All @@ -72,11 +75,11 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">waterfall</string>
<string key="label">stream</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="442277849"/>
</object>
<int key="connectionID">10</int>
<int key="connectionID">11</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
Expand Down Expand Up @@ -134,13 +137,32 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">10</int>
<int key="maxID">11</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">EKStreamView</string>
<string key="superclassName">UIScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EKStreamView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">EKViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">stream</string>
<string key="NS.object.0">EKStreamView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">stream</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">stream</string>
<string key="candidateClassName">EKStreamView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EKViewController.h</string>
Expand Down

0 comments on commit d297224

Please sign in to comment.