#Visual Debuging#
If you are borred to use po myObject
to check the content of your objects, you may use debugQuickLookObject
, an XCode hidden gem.
Assuming your object is a subclass of NSObject
- (id)debugQuickLookObject {
UIImage* img = [UIImage imageNamed:self.productThumbImage];
UIImageView* view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, img.size.width, img.size.height)];
view.image = img;
return view;
}
This code will let you use the quick look preview when XCode is stopped for debug :