Browse files

Implmeneted NSCopying

  • Loading branch information...
1 parent 8689c88 commit 371429d6eb43ecaf3cfadc8556c0e850f54bca70 @odrobnik odrobnik committed May 12, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −1 Core/Source/DTCSSStylesheet.h
  2. +9 −0 Core/Source/DTCSSStylesheet.m
View
2 Core/Source/DTCSSStylesheet.h
@@ -15,7 +15,7 @@
It supports matching styles by class, by id or by tag name. Hierarchy matching is not supported yet.
*/
-@interface DTCSSStylesheet : NSObject
+@interface DTCSSStylesheet : NSObject <NSCopying>
/**
View
9 Core/Source/DTCSSStylesheet.m
@@ -374,4 +374,13 @@ - (NSDictionary *)styles
return _styles;
}
+#pragma mark NSCopying
+
+- (id)copyWithZone:(NSZone *)zone
+{
+ DTCSSStylesheet *newStylesheet = [[DTCSSStylesheet allocWithZone:zone] initWithStylesheet:self];
+
+ return newStylesheet;
+}
+
@end

0 comments on commit 371429d

Please sign in to comment.