Skip to content

Commit

Permalink
Added accessor to determine if a VSStyleSheet is the global stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
stevestreza committed Jan 4, 2010
1 parent 249081d commit 493b84f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/VSStyleSheet.h
Expand Up @@ -23,5 +23,6 @@ extern const NSString *VSStyleSheetChangedNotification;

+ (void)setGlobalStyleSheet:(VSStyleSheet*)styleSheet;

- (BOOL)isGlobalStyleSheet;
- (VSStyle*)styleWithSelector:(NSString*)selector;
@end
4 changes: 4 additions & 0 deletions Source/VSStyleSheet.m
Expand Up @@ -95,6 +95,10 @@ + (id) styleSheet{
///////////////////////////////////////////////////////////////////////////////////////////////////
// public

- (BOOL)isGlobalStyleSheet{
return [[[self class] globalStyleSheet] class] == [self class];
}

- (VSStyle*)styleWithSelector:(NSString*)selector {
if(!selector) return nil;

Expand Down

0 comments on commit 493b84f

Please sign in to comment.