Created
December 18, 2012 14:33
-
-
Save jontelang/4328476 to your computer and use it in GitHub Desktop.
Center badges 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*%hook SBIconImageContainerView | |
@interface SBIconImageContainerView : UIView | |
@end | |
-(void)addSubview:(UIView *)view{ | |
//Class _icon = objc_getClass("SBIconBadgeImage"); | |
Class _icon = objc_getClass("UIImageView"); | |
if( [view isKindOfClass:_icon] ) | |
{ | |
[view setCenter:CGPointMake(self.bounds.size.width/2,view.bounds.origin.y)]; | |
} | |
%orig; | |
} | |
%end*/ | |
%hook SBIconView | |
@interface SBIconView : UIView | |
-(UIImageView*)_badgeView; | |
//-(void)_updateBadgePosition; | |
@end | |
-(void)updateBadge{ | |
%orig; | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"__________________________"); | |
NSLog(@"%@", [self _badgeView]); | |
[[self _badgeView] setCenter:CGPointMake(self.bounds.size.width/2,self.bounds.origin.y)]; | |
//[self _updateBadgePosition]; | |
} | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment