CoreData error

John Shockey john at johncshockey.com
Wed Jun 18 14:16:06 EDT 2014


Owen,



I've written code like that myself, when I need some particular
information.



But it turns out there's already code like that built in.



Which maybe leads to another tip:



Read whichever is appropriate of the tech notes



Technical Note TN2239 -- iOS Debugging Magic



Technical Note TN2124 -- Mac OS X Debugging Magic



(See the methods "recursiveDescription" in the first case, and
"_subtreeDescription" in the second. They are not documented
elsewhere.)



John





Here's a piece of code I use a lot, particularly when I'm wrestling
with UI annoyances that I can't seem to get quite straight:



// useful debugging method - send it a view and it will log all
subviews
// can be called from the debugger
- (void) viewAllSubviews:(UIView *) topView Indent:(NSString *) indent
{
for (UIView * theView in [topView subviews]){
NSLog(@"%@%@", indent, theView);
if ([theView subviews] != nil)
[selfviewAllSubviews:theView Indent: [NSStringstringWithFormat:@"%@
",indent]];
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mactechgroup.org/pipermail/mactechgroup-discuss/attachments/20140618/dc35df0f/attachment-0001.html>


More information about the MacTechGroup-discuss mailing list