2012-06-07 1 views
0

Я хочу скрыть размытую тень SBBulletinBlurredShadowLabel (Private Framework), подключив его к theos.Скрыть тень SBBulletinBlurredShadowLabel с theos

SBBulletinBlurredShadowLabel.h:

#import "UILabel.h" 

@interface SBBulletinBlurredShadowLabel : UILabel 
{ 
} 

- (struct CGSize)sizeThatFits:(struct CGSize)arg1; 
- (void)drawTextInRect:(struct CGRect)arg1; 

@end 

и здесь используется

SBBulletinHeaderView.h:

#import "SBBulletinLinenSegmentView.h" 

@class NSString, SBBulletinBlurredShadowLabel, SBBulletinClearButton, UIView; 

@interface SBBulletinHeaderView : SBBulletinLinenSegmentView 
{ 
    UIView *_translucentOverlay; 
    UIView *_iconView; 
    SBBulletinBlurredShadowLabel *_sectionLabel; 
    SBBulletinClearButton *_clearButton; 
    id <SBBulletinHeaderViewDelegate> _delegate; 
    NSString *_sectionID; 
} 

+ (float)headerHeight; 
- (id)initWithFrame:(struct CGRect)arg1 linenView:(id)arg2; 
@property(retain, nonatomic) NSString *sectionID; // @synthesize sectionID=_sectionID; 
- (void)dealloc; 
- (void)setShowsClearButton:(BOOL)arg1 animated:(BOOL)arg2; 
- (void)layoutSubviews; 
- (void)willMoveToWindow:(id)arg1; 
- (id)_sectionNameForSectionID:(id)arg1; 
- (id)_newIconViewForSectionID:(id)arg1; 
@property(readonly, nonatomic) SBBulletinClearButton *clearButton; // @synthesize clearButton=_clearButton; 
@property(nonatomic) id <SBBulletinHeaderViewDelegate> delegate; // @synthesize delegate=_delegate; 

@end 

Что не работает:

%hook SBBulletinBlurredShadowLabel 
- (void)drawTextInRect:(struct CGRect)arg1 { 
//skips it. The label disappears 
} 
%end 

%hook SBBulletinHeaderView 
- (void)layoutSubviews { 
// does not work since SBBulletinBlurredShadowLabel doesn't use the standard UILabel shadow 
self._sectionLabel.shadowColor = [UIColor clearColor]; 
} 
%end 

Моя мысль:

%hook SBBulletinBlurredShadowLabel 
- (void)drawTextInRect:(struct CGRect)arg1 { 
[super drawTextInRect:arg1]; 
} 
%end 

Но я не знаю, как назвать супер при подключении с помощью theos.

Любые предложения, как скрыть тень или как позвонить супер?

ответ

0

В Theos, %orig; является эквивалентом супер с оригинальными аргументами;

Вы также можете использовать %orig(arg1, arg2, etc);, чтобы передать пользовательские аргументы в супер.

 Смежные вопросы

  • Нет связанных вопросов^_^