Skip to content

Commit

Permalink
- Implemented using user readable section name.
Browse files Browse the repository at this point in the history
- Some minor visual tweaks to align the issue line closer to its corresponding content.
  • Loading branch information
Colin Guenther committed Aug 14, 2012
1 parent ad72260 commit 8c6a32c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 97 deletions.
148 changes: 52 additions & 96 deletions iOSDevWeekly/COGUNewsItemCell.xib
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewCell" id="439617863">
<object class="IBUITableViewCell" id="1005418205">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIView" id="529679254">
<reference key="NSNextResponder" ref="439617863"/>
<object class="IBUIView" id="417326789">
<reference key="NSNextResponder" ref="1005418205"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUILabel" id="1008321871">
<reference key="NSNextResponder" ref="529679254"/>
<object class="IBUILabel" id="511381366">
<reference key="NSNextResponder" ref="417326789"/>
<int key="NSvFlags">290</int>
<string key="NSFrame">{{10, 0}, {300, 21}}</string>
<reference key="NSSuperview" ref="529679254"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="44006557"/>
<string key="NSFrame">{{10, 4}, {300, 21}}</string>
<reference key="NSSuperview" ref="417326789"/>
<reference key="NSNextKeyView" ref="226299786"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
Expand All @@ -58,7 +57,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4yMDAwMDAwMDMgMC4yMDAwMDAwMDMgMC4yMDAwMDAwMDMAA</bytes>
</object>
<object class="NSColor" key="IBUIHighlightedColor" id="339182620">
<object class="NSColor" key="IBUIHighlightedColor" id="372404931">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
Expand All @@ -75,13 +74,12 @@
</object>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
<object class="IBUILabel" id="44006557">
<reference key="NSNextResponder" ref="529679254"/>
<object class="IBUILabel" id="226299786">
<reference key="NSNextResponder" ref="417326789"/>
<int key="NSvFlags">290</int>
<string key="NSFrame">{{10, 20}, {300, 43}}</string>
<reference key="NSSuperview" ref="529679254"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="929750894"/>
<string key="NSFrame">{{10, 24}, {300, 43}}</string>
<reference key="NSSuperview" ref="417326789"/>
<reference key="NSNextKeyView" ref="11494711"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
Expand All @@ -93,7 +91,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC40MDAwMDAwMDYgMC40MDAwMDAwMDYgMC40MDAwMDAwMDYAA</bytes>
</object>
<reference key="IBUIHighlightedColor" ref="339182620"/>
<reference key="IBUIHighlightedColor" ref="372404931"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">2</int>
Expand All @@ -109,26 +107,24 @@
</object>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
<object class="IBUIView" id="929750894">
<reference key="NSNextResponder" ref="529679254"/>
<object class="IBUIView" id="11494711">
<reference key="NSNextResponder" ref="417326789"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{0, 71}, {320, 20}}</string>
<reference key="NSSuperview" ref="529679254"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="367552394"/>
<string key="NSFrame">{{0, 69}, {320, 20}}</string>
<reference key="NSSuperview" ref="417326789"/>
<reference key="NSNextKeyView" ref="565616531"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC45NTI0NTMzMzcxIDAuOTUyNDUzMzM3MSAwLjk1MjQ1MzMzNzEAA</bytes>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUILabel" id="367552394">
<reference key="NSNextResponder" ref="529679254"/>
<object class="IBUILabel" id="565616531">
<reference key="NSNextResponder" ref="417326789"/>
<int key="NSvFlags">290</int>
<string key="NSFrame">{{10, 71}, {300, 20}}</string>
<reference key="NSSuperview" ref="529679254"/>
<reference key="NSWindow"/>
<string key="NSFrame">{{10, 69}, {300, 20}}</string>
<reference key="NSSuperview" ref="417326789"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -141,7 +137,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xNzIwOTA5MjQ3IDAuNDQzNTUyMTY5MSAxAA</bytes>
</object>
<reference key="IBUIHighlightedColor" ref="339182620"/>
<reference key="IBUIHighlightedColor" ref="372404931"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">2</int>
Expand All @@ -159,10 +155,9 @@
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
</array>
<string key="NSFrameSize">{320, 91}</string>
<reference key="NSSuperview" ref="439617863"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1008321871"/>
<string key="NSFrameSize">{320, 87}</string>
<reference key="NSSuperview" ref="1005418205"/>
<reference key="NSNextKeyView" ref="511381366"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
Expand All @@ -175,41 +170,40 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<string key="NSFrameSize">{320, 92}</string>
<string key="NSFrameSize">{320, 88}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="529679254"/>
<reference key="NSNextKeyView" ref="417326789"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUISelectionStyle">0</int>
<reference key="IBUIContentView" ref="529679254"/>
<reference key="IBUIContentView" ref="417326789"/>
<string key="IBUIReuseIdentifier">COGUNewsItemCell</string>
<real value="92" key="IBUIRowHeight"/>
<real value="88" key="IBUIRowHeight"/>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">titleControl</string>
<reference key="source" ref="439617863"/>
<reference key="destination" ref="1008321871"/>
<reference key="source" ref="1005418205"/>
<reference key="destination" ref="511381366"/>
</object>
<int key="connectionID">8</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">explanationControl</string>
<reference key="source" ref="439617863"/>
<reference key="destination" ref="44006557"/>
<reference key="source" ref="1005418205"/>
<reference key="destination" ref="226299786"/>
</object>
<int key="connectionID">9</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">issueControl</string>
<reference key="source" ref="439617863"/>
<reference key="destination" ref="367552394"/>
<reference key="source" ref="1005418205"/>
<reference key="destination" ref="565616531"/>
</object>
<int key="connectionID">10</int>
</object>
Expand All @@ -235,37 +229,37 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="439617863"/>
<reference key="object" ref="1005418205"/>
<array class="NSMutableArray" key="children">
<reference ref="1008321871"/>
<reference ref="44006557"/>
<reference ref="367552394"/>
<reference ref="929750894"/>
<reference ref="511381366"/>
<reference ref="226299786"/>
<reference ref="565616531"/>
<reference ref="11494711"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="1008321871"/>
<reference key="parent" ref="439617863"/>
<reference key="object" ref="511381366"/>
<reference key="parent" ref="1005418205"/>
<string key="objectName">title</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="44006557"/>
<reference key="parent" ref="439617863"/>
<reference key="object" ref="226299786"/>
<reference key="parent" ref="1005418205"/>
<string key="objectName">explanation</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="367552394"/>
<reference key="parent" ref="439617863"/>
<reference key="object" ref="565616531"/>
<reference key="parent" ref="1005418205"/>
<string key="objectName">issue</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="929750894"/>
<reference key="parent" ref="439617863"/>
<reference key="object" ref="11494711"/>
<reference key="parent" ref="1005418205"/>
<string key="objectName">issueBackground</string>
</object>
</array>
Expand All @@ -287,45 +281,7 @@
<nil key="sourceID"/>
<int key="maxID">10</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">COGUNewsItemCell</string>
<string key="superclassName">COGUNibTableCell</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="explanationControl">UILabel</string>
<string key="issueControl">UILabel</string>
<string key="titleControl">UILabel</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="explanationControl">
<string key="name">explanationControl</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="issueControl">
<string key="name">issueControl</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="titleControl">
<string key="name">titleControl</string>
<string key="candidateClassName">UILabel</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/COGUNewsItemCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">COGUNibTableCell</string>
<string key="superclassName">UITableViewCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/COGUNibTableCell.h</string>
</object>
</object>
</array>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
Expand Down
2 changes: 1 addition & 1 deletion iOSDevWeekly/COGUNewsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS
- (NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section;
{
id<NSFetchedResultsSectionInfo> sectionInfo = self.fetchedNewsResultsController.sections[(NSUInteger)section];
NSString* sectionName = [sectionInfo name];
NSString* sectionName = [[sectionInfo objects].cogu_firstObject category].userReadableName;
return sectionName;
}

Expand Down

0 comments on commit 8c6a32c

Please sign in to comment.