Skip to content

Commit 1213443

Browse files
committed
Add Quick Look Debug for UYLTextCell
1 parent e8eaaf5 commit 1213443

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

Huckleberry/Huckleberry.xcodeproj/project.pbxproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
isa = PBXProject;
141141
attributes = {
142142
CLASSPREFIX = UYL;
143-
LastUpgradeCheck = 0500;
143+
LastUpgradeCheck = 0510;
144144
ORGANIZATIONNAME = "Keith Harrison";
145145
};
146146
buildConfigurationList = 5363F6CD18AADBF6001CBD3A /* Build configuration list for PBXProject "Huckleberry" */;
@@ -213,7 +213,6 @@
213213
isa = XCBuildConfiguration;
214214
buildSettings = {
215215
ALWAYS_SEARCH_USER_PATHS = NO;
216-
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
217216
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
218217
CLANG_CXX_LIBRARY = "libc++";
219218
CLANG_ENABLE_MODULES = YES;
@@ -252,7 +251,6 @@
252251
isa = XCBuildConfiguration;
253252
buildSettings = {
254253
ALWAYS_SEARCH_USER_PATHS = NO;
255-
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
256254
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
257255
CLANG_CXX_LIBRARY = "libc++";
258256
CLANG_ENABLE_MODULES = YES;

Huckleberry/Huckleberry/UYLTextCell.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,15 @@
3535

3636
@implementation UYLTextCell
3737

38+
- (id)debugQuickLookObject
39+
{
40+
// NSString *result = [NSString stringWithFormat:@"%@: %@",self.numberLabel.text,self.lineLabel.text];
41+
42+
NSAttributedString *cr = [[NSAttributedString alloc] initWithString:@"\n"];
43+
NSMutableAttributedString *result = [[NSMutableAttributedString alloc] initWithAttributedString:self.numberLabel.attributedText];
44+
[result appendAttributedString:cr];
45+
[result appendAttributedString:self.lineLabel.attributedText];
46+
return result;
47+
}
3848

3949
@end

Huckleberry/README

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
=======================================================================
22
Huckleberry - Auto layout table view cells with varying row heights
3+
Version 1.1 12 March 2014 Added Quick Look Debug
34
Version 1.0 14 February 2014 Initial version.
45
=======================================================================
56

@@ -11,4 +12,10 @@ of Huckleberry Finn as found on Project Gutenberg. This gives nearly
1112
2000 rows of data.
1213

1314
For further details see the following blog post:
14-
http://useyourloaf.com/blog/2014/02/14/table-view-cells-with-varying-row-heights.html
15+
http://useyourloaf.com/blog/2014/02/14/table-view-cells-with-varying-row-heights.html
16+
17+
The custom table view class (UYLTextCell) includes an implementation
18+
of debugQuickLookObject to support Quick Look view of the cell in the
19+
Xcode debugger (requires Xcode 5.1). See the following post for details:
20+
21+
http://useyourloaf.com/blog/2014/03/12/xcode-debugger-quick-look.html

0 commit comments

Comments
 (0)