Advertisement
Guest User

Untitled

a guest
Sep 30th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import "NoShadowTableView.h"
  2.  
  3. @implementation NoShadowTableView
  4.  
  5. - (void) didAddSubview:(UIView *)subview
  6. {
  7.     [super didAddSubview:subview];
  8.     //  Hide any shadows
  9.    
  10.     if([[[subview class] description] isEqualToString:@"UITableViewWrapperView"]) {
  11.         [NSTimer scheduledTimerWithTimeInterval:0.01f target:self selector:@selector(watchForSubviews:) userInfo:subview repeats:YES];
  12.     }
  13.    
  14. }
  15.  
  16. - (void)watchForSubviews:(NSTimer *)timer {
  17.     UIView *v = timer.userInfo;
  18.     for (UIView *sv in v.subviews) {
  19.         if ([sv isKindOfClass:NSClassFromString(@"UIShadowView")]) {
  20.             sv.hidden = YES;
  21.         }
  22.     }
  23. }
  24.  
  25. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement