Skip to content

Commit 23f8a89

Browse files
author
Brian Morton
committed
Add custom UITableViewCell for displaying RKGHIssue rows.
1 parent bd76840 commit 23f8a89

File tree

3 files changed

+355
-0
lines changed

3 files changed

+355
-0
lines changed

Code/Views/RKGHIssueCell.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// RKGHIssueCell.h
3+
// RKGithub
4+
//
5+
// Created by Brian Morton on 2/24/12.
6+
// Copyright (c) 2012 RestKit. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface RKGHIssueCell : UITableViewCell
12+
13+
@property (nonatomic, weak) IBOutlet UILabel *titleLabel;
14+
@property (nonatomic, weak) IBOutlet UILabel *descriptionLabel;
15+
@property (nonatomic, weak) IBOutlet UILabel *bottomDetailLabel;
16+
17+
@property (nonatomic, strong) NSString *issueNumber;
18+
@property (nonatomic, strong) NSString *creatorName;
19+
@property (nonatomic, strong) NSString *createdAgo;
20+
21+
@end

Code/Views/RKGHIssueCell.m

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// RKGHIssueCell.m
3+
// RKGithub
4+
//
5+
// Created by Brian Morton on 2/24/12.
6+
// Copyright (c) 2012 RestKit. All rights reserved.
7+
//
8+
9+
#import "RKGHIssueCell.h"
10+
11+
@implementation RKGHIssueCell
12+
@synthesize titleLabel;
13+
@synthesize descriptionLabel;
14+
@synthesize bottomDetailLabel;
15+
@synthesize issueNumber = _issueNumber;
16+
@synthesize creatorName = _creatorName;
17+
@synthesize createdAgo = _createdAgo;
18+
19+
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
20+
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
21+
if (self) {
22+
// Initialization code
23+
}
24+
return self;
25+
}
26+
27+
- (void)setIssueNumber:(NSString *)issueNumber {
28+
_issueNumber = issueNumber;
29+
[self updateBottomDetailLabel];
30+
}
31+
32+
- (void)setCreatorName:(NSString *)creatorName {
33+
_creatorName = creatorName;
34+
[self updateBottomDetailLabel];
35+
}
36+
37+
- (void)setCreatedAgo:(NSString *)createdAgo {
38+
_createdAgo = createdAgo;
39+
[self updateBottomDetailLabel];
40+
}
41+
42+
- (void)updateBottomDetailLabel {
43+
self.bottomDetailLabel.text = [NSString stringWithFormat:@"Issue #%@ / %@ / %@", self.issueNumber, self.creatorName, self.createdAgo];
44+
}
45+
46+
@end

Code/Views/RKGHIssueCell.xib

Lines changed: 288 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
3+
<data>
4+
<int key="IBDocument.SystemTarget">1280</int>
5+
<string key="IBDocument.SystemVersion">11D50</string>
6+
<string key="IBDocument.InterfaceBuilderVersion">2177</string>
7+
<string key="IBDocument.AppKitVersion">1138.32</string>
8+
<string key="IBDocument.HIToolboxVersion">568.00</string>
9+
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10+
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
11+
<string key="NS.object.0">1173</string>
12+
</object>
13+
<array key="IBDocument.IntegratedClassDependencies">
14+
<string>IBProxyObject</string>
15+
<string>IBUILabel</string>
16+
<string>IBUITableViewCell</string>
17+
</array>
18+
<array key="IBDocument.PluginDependencies">
19+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
20+
</array>
21+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
22+
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
23+
<integer value="1" key="NS.object.0"/>
24+
</object>
25+
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
26+
<object class="IBProxyObject" id="841351856">
27+
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
28+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
29+
</object>
30+
<object class="IBProxyObject" id="371349661">
31+
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
32+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
33+
</object>
34+
<object class="IBUITableViewCell" id="506599320">
35+
<reference key="NSNextResponder"/>
36+
<int key="NSvFlags">292</int>
37+
<array class="NSMutableArray" key="NSSubviews">
38+
<object class="IBUIView" id="840849820">
39+
<reference key="NSNextResponder" ref="506599320"/>
40+
<int key="NSvFlags">256</int>
41+
<array class="NSMutableArray" key="NSSubviews">
42+
<object class="IBUILabel" id="894365236">
43+
<reference key="NSNextResponder" ref="840849820"/>
44+
<int key="NSvFlags">292</int>
45+
<string key="NSFrame">{{10, 4}, {280, 21}}</string>
46+
<reference key="NSSuperview" ref="840849820"/>
47+
<reference key="NSWindow"/>
48+
<reference key="NSNextKeyView" ref="644996993"/>
49+
<string key="NSReuseIdentifierKey">_NS:9</string>
50+
<bool key="IBUIOpaque">NO</bool>
51+
<bool key="IBUIClipsSubviews">YES</bool>
52+
<int key="IBUIContentMode">7</int>
53+
<bool key="IBUIUserInteractionEnabled">NO</bool>
54+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
55+
<string key="IBUIText">The title of the issue.</string>
56+
<object class="NSColor" key="IBUITextColor">
57+
<int key="NSColorSpace">1</int>
58+
<bytes key="NSRGB">MCAwIDAAA</bytes>
59+
</object>
60+
<object class="NSColor" key="IBUIHighlightedColor" id="366151633">
61+
<int key="NSColorSpace">3</int>
62+
<bytes key="NSWhite">MQA</bytes>
63+
</object>
64+
<int key="IBUIBaselineAdjustment">0</int>
65+
<float key="IBUIMinimumFontSize">10</float>
66+
<object class="IBUIFontDescription" key="IBUIFontDescription">
67+
<int key="type">2</int>
68+
<double key="pointSize">14</double>
69+
</object>
70+
<object class="NSFont" key="IBUIFont">
71+
<string key="NSName">Helvetica-Bold</string>
72+
<double key="NSSize">14</double>
73+
<int key="NSfFlags">16</int>
74+
</object>
75+
</object>
76+
<object class="IBUILabel" id="644996993">
77+
<reference key="NSNextResponder" ref="840849820"/>
78+
<int key="NSvFlags">292</int>
79+
<string key="NSFrame">{{20, 22}, {270, 55}}</string>
80+
<reference key="NSSuperview" ref="840849820"/>
81+
<reference key="NSWindow"/>
82+
<reference key="NSNextKeyView" ref="62035268"/>
83+
<string key="NSReuseIdentifierKey">_NS:9</string>
84+
<bool key="IBUIOpaque">NO</bool>
85+
<bool key="IBUIClipsSubviews">YES</bool>
86+
<int key="IBUIContentMode">7</int>
87+
<bool key="IBUIUserInteractionEnabled">NO</bool>
88+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
89+
<string key="IBUIText">Locavore polaroid bespoke odd future wes anderson. Cillum shoreditch cray aliqua, swag banh mi before they sold out.</string>
90+
<object class="NSColor" key="IBUITextColor">
91+
<int key="NSColorSpace">3</int>
92+
<bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
93+
</object>
94+
<reference key="IBUIHighlightedColor" ref="366151633"/>
95+
<int key="IBUIBaselineAdjustment">0</int>
96+
<float key="IBUIMinimumFontSize">10</float>
97+
<int key="IBUINumberOfLines">3</int>
98+
<object class="IBUIFontDescription" key="IBUIFontDescription" id="445734843">
99+
<int key="type">1</int>
100+
<double key="pointSize">13</double>
101+
</object>
102+
<object class="NSFont" key="IBUIFont" id="355557533">
103+
<string key="NSName">Helvetica</string>
104+
<double key="NSSize">13</double>
105+
<int key="NSfFlags">16</int>
106+
</object>
107+
</object>
108+
<object class="IBUILabel" id="62035268">
109+
<reference key="NSNextResponder" ref="840849820"/>
110+
<int key="NSvFlags">292</int>
111+
<string key="NSFrame">{{10, 78}, {290, 18}}</string>
112+
<reference key="NSSuperview" ref="840849820"/>
113+
<reference key="NSWindow"/>
114+
<string key="NSReuseIdentifierKey">_NS:9</string>
115+
<bool key="IBUIOpaque">NO</bool>
116+
<bool key="IBUIClipsSubviews">YES</bool>
117+
<int key="IBUIContentMode">7</int>
118+
<bool key="IBUIUserInteractionEnabled">NO</bool>
119+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
120+
<string key="IBUIText">Issue #123 / bmorton / 3 days ago</string>
121+
<object class="NSColor" key="IBUITextColor">
122+
<int key="NSColorSpace">3</int>
123+
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
124+
</object>
125+
<reference key="IBUIHighlightedColor" ref="366151633"/>
126+
<int key="IBUIBaselineAdjustment">0</int>
127+
<float key="IBUIMinimumFontSize">10</float>
128+
<int key="IBUINumberOfLines">999</int>
129+
<reference key="IBUIFontDescription" ref="445734843"/>
130+
<reference key="IBUIFont" ref="355557533"/>
131+
</object>
132+
</array>
133+
<string key="NSFrameSize">{300, 99}</string>
134+
<reference key="NSSuperview" ref="506599320"/>
135+
<reference key="NSWindow"/>
136+
<reference key="NSNextKeyView" ref="894365236"/>
137+
<string key="NSReuseIdentifierKey">_NS:11</string>
138+
<object class="NSColor" key="IBUIBackgroundColor">
139+
<int key="NSColorSpace">3</int>
140+
<bytes key="NSWhite">MCAwAA</bytes>
141+
</object>
142+
<bool key="IBUIOpaque">NO</bool>
143+
<bool key="IBUIClipsSubviews">YES</bool>
144+
<int key="IBUIContentMode">4</int>
145+
<bool key="IBUIMultipleTouchEnabled">YES</bool>
146+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
147+
</object>
148+
</array>
149+
<string key="NSFrameSize">{320, 100}</string>
150+
<reference key="NSSuperview"/>
151+
<reference key="NSWindow"/>
152+
<reference key="NSNextKeyView" ref="840849820"/>
153+
<string key="NSReuseIdentifierKey">_NS:9</string>
154+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
155+
<int key="IBUIAccessoryType">1</int>
156+
<reference key="IBUIContentView" ref="840849820"/>
157+
<string key="IBUIReuseIdentifier">RKGHIssue</string>
158+
<real value="100" key="IBUIRowHeight"/>
159+
</object>
160+
</array>
161+
<object class="IBObjectContainer" key="IBDocument.Objects">
162+
<array class="NSMutableArray" key="connectionRecords">
163+
<object class="IBConnectionRecord">
164+
<object class="IBCocoaTouchOutletConnection" key="connection">
165+
<string key="label">titleLabel</string>
166+
<reference key="source" ref="506599320"/>
167+
<reference key="destination" ref="894365236"/>
168+
</object>
169+
<int key="connectionID">6</int>
170+
</object>
171+
<object class="IBConnectionRecord">
172+
<object class="IBCocoaTouchOutletConnection" key="connection">
173+
<string key="label">descriptionLabel</string>
174+
<reference key="source" ref="506599320"/>
175+
<reference key="destination" ref="644996993"/>
176+
</object>
177+
<int key="connectionID">8</int>
178+
</object>
179+
<object class="IBConnectionRecord">
180+
<object class="IBCocoaTouchOutletConnection" key="connection">
181+
<string key="label">bottomDetailLabel</string>
182+
<reference key="source" ref="506599320"/>
183+
<reference key="destination" ref="62035268"/>
184+
</object>
185+
<int key="connectionID">9</int>
186+
</object>
187+
</array>
188+
<object class="IBMutableOrderedSet" key="objectRecords">
189+
<array key="orderedObjects">
190+
<object class="IBObjectRecord">
191+
<int key="objectID">0</int>
192+
<array key="object" id="0"/>
193+
<reference key="children" ref="1000"/>
194+
<nil key="parent"/>
195+
</object>
196+
<object class="IBObjectRecord">
197+
<int key="objectID">-1</int>
198+
<reference key="object" ref="841351856"/>
199+
<reference key="parent" ref="0"/>
200+
<string key="objectName">File's Owner</string>
201+
</object>
202+
<object class="IBObjectRecord">
203+
<int key="objectID">-2</int>
204+
<reference key="object" ref="371349661"/>
205+
<reference key="parent" ref="0"/>
206+
</object>
207+
<object class="IBObjectRecord">
208+
<int key="objectID">2</int>
209+
<reference key="object" ref="506599320"/>
210+
<array class="NSMutableArray" key="children">
211+
<reference ref="894365236"/>
212+
<reference ref="644996993"/>
213+
<reference ref="62035268"/>
214+
</array>
215+
<reference key="parent" ref="0"/>
216+
</object>
217+
<object class="IBObjectRecord">
218+
<int key="objectID">3</int>
219+
<reference key="object" ref="894365236"/>
220+
<reference key="parent" ref="506599320"/>
221+
</object>
222+
<object class="IBObjectRecord">
223+
<int key="objectID">4</int>
224+
<reference key="object" ref="644996993"/>
225+
<reference key="parent" ref="506599320"/>
226+
</object>
227+
<object class="IBObjectRecord">
228+
<int key="objectID">5</int>
229+
<reference key="object" ref="62035268"/>
230+
<reference key="parent" ref="506599320"/>
231+
</object>
232+
</array>
233+
</object>
234+
<dictionary class="NSMutableDictionary" key="flattenedProperties">
235+
<string key="-1.CustomClassName">RKGHIssueCell</string>
236+
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
237+
<string key="-2.CustomClassName">UIResponder</string>
238+
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
239+
<string key="2.CustomClassName">RKGHIssueCell</string>
240+
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
241+
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
242+
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
243+
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
244+
</dictionary>
245+
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
246+
<nil key="activeLocalization"/>
247+
<dictionary class="NSMutableDictionary" key="localizations"/>
248+
<nil key="sourceID"/>
249+
<int key="maxID">9</int>
250+
</object>
251+
<object class="IBClassDescriber" key="IBDocument.Classes">
252+
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
253+
<object class="IBPartialClassDescription">
254+
<string key="className">RKGHIssueCell</string>
255+
<string key="superclassName">UITableViewCell</string>
256+
<dictionary class="NSMutableDictionary" key="outlets">
257+
<string key="bottomDetailLabel">UILabel</string>
258+
<string key="descriptionLabel">UILabel</string>
259+
<string key="titleLabel">UILabel</string>
260+
</dictionary>
261+
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
262+
<object class="IBToOneOutletInfo" key="bottomDetailLabel">
263+
<string key="name">bottomDetailLabel</string>
264+
<string key="candidateClassName">UILabel</string>
265+
</object>
266+
<object class="IBToOneOutletInfo" key="descriptionLabel">
267+
<string key="name">descriptionLabel</string>
268+
<string key="candidateClassName">UILabel</string>
269+
</object>
270+
<object class="IBToOneOutletInfo" key="titleLabel">
271+
<string key="name">titleLabel</string>
272+
<string key="candidateClassName">UILabel</string>
273+
</object>
274+
</dictionary>
275+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
276+
<string key="majorKey">IBProjectSource</string>
277+
<string key="minorKey">./Classes/RKGHIssueCell.h</string>
278+
</object>
279+
</object>
280+
</array>
281+
</object>
282+
<int key="IBDocument.localizationMode">0</int>
283+
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
284+
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
285+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
286+
<string key="IBCocoaTouchPluginVersion">1173</string>
287+
</data>
288+
</archive>

0 commit comments

Comments
 (0)