Skip to content

Instantly share code, notes, and snippets.

@jontelang
Created December 18, 2012 13:56
Show Gist options
  • Save jontelang/4328170 to your computer and use it in GitHub Desktop.
Save jontelang/4328170 to your computer and use it in GitHub Desktop.
Center the badges
%hook SBIconImageContainerView
@interface SBIconImageContainerView : UIView
@end
-(void)addSubview:(UIView *)view{
Class _icon = objc_getClass("UIImageView");
if( [view isKindOfClass:_icon] )
{
[view setCenter:CGPointMake(self.bounds.size.width/2,view.bounds.origin.y)];
}
%orig;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment