From a7a30a7cbf2b4fb8f22c170b3fa2b7ee5f45e662 Mon Sep 17 00:00:00 2001 From: iska Date: Thu, 14 May 2015 21:27:08 +0200 Subject: [PATCH] Add convenience initializer for the Type Selector --- HTMLKit/CSSTypeSelector.h | 2 ++ HTMLKit/CSSTypeSelector.m | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/HTMLKit/CSSTypeSelector.h b/HTMLKit/CSSTypeSelector.h index 6cd2e16..acc6b6e 100644 --- a/HTMLKit/CSSTypeSelector.h +++ b/HTMLKit/CSSTypeSelector.h @@ -14,6 +14,8 @@ @property (nonatomic, copy) NSString *type; + (instancetype)universalSelector; ++ (instancetype)selectorForType:(NSString *)type; + - (instancetype)initWithType:(NSString *)type; @end diff --git a/HTMLKit/CSSTypeSelector.m b/HTMLKit/CSSTypeSelector.m index dd916bb..f0a336e 100644 --- a/HTMLKit/CSSTypeSelector.m +++ b/HTMLKit/CSSTypeSelector.m @@ -23,6 +23,11 @@ return [[self alloc] initWithType:@"*"]; } ++ (instancetype)selectorForType:(NSString *)type +{ + return [[self alloc] initWithType:type]; +} + - (instancetype)initWithType:(NSString *)type { self = [super init];