Skip to content

Instantly share code, notes, and snippets.

@vitoziv
Created December 11, 2013 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitoziv/7906394 to your computer and use it in GitHub Desktop.
Save vitoziv/7906394 to your computer and use it in GitHub Desktop.
NoShadowTableView - Removing reorder cell shadows from a UITableView
#import "NoShadowTableView.h"
@interface NoShadowTableView ()
{
// iOS7
__weak UIView* wrapperView;
}
@end
@implementation NoShadowTableView
- (void) didAddSubview:(UIView *)subview
{
[super didAddSubview:subview];
// iOS7
if(wrapperView == nil && [[[subview class] description] isEqualToString:@"UITableViewWrapperView"])
wrapperView = subview;
// iOS6
if([[[subview class] description] isEqualToString:@"UIShadowView"])
[subview setHidden:YES];
}
- (void) layoutSubviews
{
[super layoutSubviews];
// iOS7
for(UIView* subview in wrapperView.subviews)
{
if([[[subview class] description] isEqualToString:@"UIShadowView"])
[subview setHidden:YES];
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment