Permalink
Browse files

Massive Project Restructuring and adding of targets for making static…

… library or framework
  • Loading branch information...
1 parent bce334d commit 22923a8e83cc43a0f3e188e59fc2b76e03e5dad1 @odrobnik odrobnik committed Nov 30, 2011
Showing with 1,061 additions and 780 deletions.
  1. +0 −25 Classes/DTRangedAttribute.h
  2. +0 −49 Classes/DTRangedAttribute.m
  3. +0 −30 Classes/DTRangedAttributesOptimizer.h
  4. +0 −99 Classes/DTRangedAttributesOptimizer.m
  5. +28 −0 Core/DTCoreText-Info.plist
  6. 0 Other Sources/CoreTextExtensions_Prefix.pch → Core/DTCoreText-Prefix.pch
  7. 0 {Classes → Core/Source}/CGUtils.h
  8. 0 {Classes → Core/Source}/CGUtils.m
  9. 0 {Classes → Core/Source}/DTAttributedTextCell.h
  10. 0 {Classes → Core/Source}/DTAttributedTextCell.m
  11. 0 {Classes → Core/Source}/DTAttributedTextContentView.h
  12. 0 {Classes → Core/Source}/DTAttributedTextContentView.m
  13. 0 {Classes → Core/Source}/DTAttributedTextView.h
  14. 0 {Classes → Core/Source}/DTAttributedTextView.m
  15. 0 {Classes → Core/Source}/DTCSSListStyle.h
  16. 0 {Classes → Core/Source}/DTCSSListStyle.m
  17. 0 {Classes → Core/Source}/DTCSSStylesheet.h
  18. 0 {Classes → Core/Source}/DTCSSStylesheet.m
  19. 0 {Classes → Core/Source}/DTCache.h
  20. 0 {Classes → Core/Source}/DTCache.m
  21. +33 −0 Core/Source/DTCoreText.h
  22. 0 {Classes → Core/Source}/DTCoreTextFontCollection.h
  23. 0 {Classes → Core/Source}/DTCoreTextFontCollection.m
  24. 0 {Classes → Core/Source}/DTCoreTextFontDescriptor.h
  25. 0 {Classes → Core/Source}/DTCoreTextFontDescriptor.m
  26. 0 {Classes → Core/Source}/DTCoreTextGlyphRun.h
  27. 0 {Classes → Core/Source}/DTCoreTextGlyphRun.m
  28. 0 {Classes → Core/Source}/DTCoreTextLayoutFrame.h
  29. 0 {Classes → Core/Source}/DTCoreTextLayoutFrame.m
  30. 0 {Classes → Core/Source}/DTCoreTextLayoutLine.h
  31. 0 {Classes → Core/Source}/DTCoreTextLayoutLine.m
  32. 0 {Classes → Core/Source}/DTCoreTextLayouter.h
  33. 0 {Classes → Core/Source}/DTCoreTextLayouter.m
  34. 0 {Classes → Core/Source}/DTCoreTextParagraphStyle.h
  35. 0 {Classes → Core/Source}/DTCoreTextParagraphStyle.m
  36. 0 {Classes → Core/Source}/DTHTMLElement.h
  37. 0 {Classes → Core/Source}/DTHTMLElement.m
  38. 0 {Classes → Core/Source}/DTLazyImageView.h
  39. 0 {Classes → Core/Source}/DTLazyImageView.m
  40. 0 {Classes → Core/Source}/DTLinkButton.h
  41. 0 {Classes → Core/Source}/DTLinkButton.m
  42. 0 {Classes → Core/Source}/DTTextAttachment.h
  43. 0 {Classes → Core/Source}/DTTextAttachment.m
  44. 0 {Classes → Core/Source}/DTWebVideoView.h
  45. 0 {Classes → Core/Source}/DTWebVideoView.m
  46. 0 {Classes → Core/Source}/NSAttributedString+DTWebArchive.h
  47. 0 {Classes → Core/Source}/NSAttributedString+DTWebArchive.m
  48. 0 {Classes → Core/Source}/NSAttributedString+HTML.h
  49. 0 {Classes → Core/Source}/NSAttributedString+HTML.m
  50. 0 {Classes → Core/Source}/NSAttributedStringRunDelegates.h
  51. 0 {Classes → Core/Source}/NSAttributedStringRunDelegates.m
  52. 0 {Classes → Core/Source}/NSCharacterSet+HTML.h
  53. 0 {Classes → Core/Source}/NSCharacterSet+HTML.m
  54. 0 {Classes → Core/Source}/NSData+Base64.h
  55. 0 {Classes → Core/Source}/NSData+Base64.m
  56. 0 {Classes → Core/Source}/NSMutableAttributedString+HTML.h
  57. 0 {Classes → Core/Source}/NSMutableAttributedString+HTML.m
  58. 0 {Classes → Core/Source}/NSScanner+HTML.h
  59. 0 {Classes → Core/Source}/NSScanner+HTML.m
  60. 0 {Classes → Core/Source}/NSString+HTML.h
  61. 0 {Classes → Core/Source}/NSString+HTML.m
  62. 0 {Classes → Core/Source}/NSString+Paragraphs.h
  63. 0 {Classes → Core/Source}/NSString+Paragraphs.m
  64. 0 {Classes → Core/Source}/NSString+UTF8Cleaner.h
  65. 0 {Classes → Core/Source}/NSString+UTF8Cleaner.m
  66. 0 {Classes → Core/Source}/NSURL+HTML.h
  67. 0 {Classes → Core/Source}/NSURL+HTML.m
  68. 0 {Classes → Core/Source}/UIColor+HTML.h
  69. 0 {Classes → Core/Source}/UIColor+HTML.m
  70. 0 {Classes → Core/Source}/UIDevice+DTVersion.h
  71. 0 {Classes → Core/Source}/UIDevice+DTVersion.m
  72. 0 {Classes → Core/Test}/NSAttributedStringHTMLTest.h
  73. 0 {Classes → Core/Test}/NSAttributedStringHTMLTest.m
  74. 0 {Classes → Core/Test}/NSStringHTMLTest.h
  75. 0 {Classes → Core/Test}/NSStringHTMLTest.m
  76. 0 {Classes → Core/Test}/UIColorHTMLTest.h
  77. 0 {Classes → Core/Test}/UIColorHTMLTest.m
  78. 0 { → Core/Test}/UnitTest-Info.plist
  79. 0 Other Sources/CoreTextExtensionsUnitTest_Prefix.pch → Core/Test/UnitTest-Prefix.pch
  80. +982 −563 CoreTextExtensions.xcodeproj/project.pbxproj
  81. 0 Resources/CoreTextExtensions-Info.plist → Demo/DemoApp-Info.plist
  82. +18 −0 Demo/DemoApp-Prefix.pch
  83. 0 { → Demo}/Resources/APOD.html
  84. 0 { → Demo}/Resources/Alignment.html
  85. 0 { → Demo}/Resources/ArabicTest.html
  86. 0 { → Demo}/Resources/CurrentTest.html
  87. 0 { → Demo}/Resources/CustomFont.html
  88. 0 { → Demo}/Resources/DTCoreTextFontOverrides.plist
  89. BIN { → Demo}/Resources/Icon.png
  90. BIN { → Demo}/Resources/Icon@2x.png
  91. 0 { → Demo}/Resources/Image.html
  92. 0 { → Demo}/Resources/ListTest.html
  93. 0 { → Demo}/Resources/LoremIpsum.html
  94. BIN { → Demo}/Resources/Oliver.jpg
  95. 0 { → Demo}/Resources/README.html
  96. 0 { → Demo}/Resources/Snippets.plist
  97. 0 { → Demo}/Resources/Subviews.html
  98. 0 { → Demo}/Resources/Video.html
  99. 0 { → Demo}/Resources/WarAndPeace.html
  100. BIN { → Demo}/Resources/XB Niloofar.ttf
  101. BIN { → Demo}/Resources/XB NiloofarBd.ttf
  102. BIN { → Demo}/Resources/icon_smile.gif
  103. 0 { → Demo}/Resources/styles.html
  104. 0 {Classes → Demo/Source}/DemoAppDelegate.h
  105. 0 {Classes → Demo/Source}/DemoAppDelegate.m
  106. 0 {Classes → Demo/Source}/DemoSnippetsViewController.h
  107. +0 −2 {Classes → Demo/Source}/DemoSnippetsViewController.m
  108. 0 {Classes → Demo/Source}/DemoTextViewController.h
  109. +0 −12 {Classes → Demo/Source}/DemoTextViewController.m
  110. 0 {Other Sources → Demo/Source}/main.m
@@ -1,25 +0,0 @@
-//
-// DTRangedAttributes.h
-// CoreTextExtensions
-//
-// Created by Oliver Drobnik on 7/31/11.
-// Copyright 2011 Drobnik.com. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface DTRangedAttribute : NSObject
-{
- NSRange _range;
- id _key;
- id _value;
-}
-
-+ (DTRangedAttribute *)rangedAttribute:(id)key value:(id)value forRange:(NSRange)range;
-- (id)initWithAttribute:(id)key value:(id)value forRange:(NSRange)range;
-
-@property (nonatomic, assign) NSRange range;
-@property (nonatomic, copy) id key;
-@property (nonatomic, retain) id value;
-
-@end
@@ -1,49 +0,0 @@
-//
-// DTRangedAttributes.m
-// CoreTextExtensions
-//
-// Created by Oliver Drobnik on 7/31/11.
-// Copyright 2011 Drobnik.com. All rights reserved.
-//
-
-#import "DTRangedAttribute.h"
-
-@implementation DTRangedAttribute
-
-+ (DTRangedAttribute *)rangedAttribute:(id)key value:(id)value forRange:(NSRange)range;
-{
- return [[[DTRangedAttribute alloc] initWithAttribute:key value:value forRange:range] autorelease];
-}
-
-- (id)initWithAttribute:(id)key value:(id)value forRange:(NSRange)range;
-{
- self = [super init];
-
- if (self)
- {
- _key = [key copy];
- _value = [value retain];
- _range = range;
- }
-
- return self;
-}
-
-- (void)dealloc
-{
- [_key release];
- [_value release];
- [super dealloc];
-}
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"<%@ range=%@ key='%@'>", NSStringFromClass([self class]), NSStringFromRange(_range), _key];
-}
-
-#pragma mark Properties
-@synthesize range = _range;
-@synthesize key = _key;
-@synthesize value = _value;
-
-@end
@@ -1,30 +0,0 @@
-//
-// DTRangedAttributesOptimizer.h
-// CoreTextExtensions
-//
-// Created by Oliver Drobnik on 7/31/11.
-// Copyright 2011 Drobnik.com. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-#import "DTRangedAttribute.h"
-
-@interface DTRangedAttributesOptimizer : NSObject
-{
- NSMutableDictionary *_attributeIndex;
- NSMutableArray *_attributes;
-
- BOOL _didMerge;
-}
-
-@property (nonatomic, readonly) BOOL didMerge;
-
-- (void)addAttribute:(DTRangedAttribute *)attribute;
-- (void)addAttributes:(NSDictionary *)attributes range:(NSRange)range;
-
-
-- (NSArray *)allKeys;
-- (NSArray *)rangedAttributesForKey:(id)key;
-
-@end
@@ -1,99 +0,0 @@
-//
-// DTRangedAttributesOptimizer.m
-// CoreTextExtensions
-//
-// Created by Oliver Drobnik on 7/31/11.
-// Copyright 2011 Drobnik.com. All rights reserved.
-//
-
-#import "DTRangedAttributesOptimizer.h"
-
-@implementation DTRangedAttributesOptimizer
-
-- (id)init
-{
- self = [super init];
- if (self) {
- _attributes = [[NSMutableArray alloc] init];
- _attributeIndex = [[NSMutableDictionary alloc] init];
- }
-
- return self;
-}
-
-- (void)dealloc
-{
- [_attributes release];
- [_attributeIndex release];
-
- [super dealloc];
-}
-
-- (NSString *)description
-{
- return [_attributeIndex description];
-}
-
-- (void)addAttribute:(DTRangedAttribute *)attribute
-{
- NSMutableArray *keyArray = [_attributeIndex objectForKey:attribute.key];
- if (keyArray)
- {
- DTRangedAttribute *previousAttribute = [keyArray lastObject];
-
- // if it's identical attribute and continues right after it
- NSInteger lastPreviousIndex = NSMaxRange(previousAttribute.range);
- if (previousAttribute.value == attribute.value && (lastPreviousIndex == attribute.range.location))
- {
- NSRange extendedRange = previousAttribute.range;
- extendedRange.length += attribute.range.length;
- previousAttribute.range = extendedRange;
-
- _didMerge = YES;
-
- return;
- }
- }
- else
- {
- keyArray = [NSMutableArray array];
- }
-
- // below this line this is not an extension of existing attribute
-
- // store it in all attributes
- [_attributes addObject:attribute];
-
- // add it to index
- [_attributeIndex setObject:keyArray forKey:(NSString *)attribute.key];
-
- [keyArray addObject:attribute];
-}
-
-- (void)addAttributes:(NSDictionary *)attributes range:(NSRange)range
-{
- for (id key in [attributes allKeys])
- {
- id value = [attributes objectForKey:key];
- DTRangedAttribute *attribute = [DTRangedAttribute rangedAttribute:key value:value forRange:range];
-
- [self addAttribute:attribute];
- }
-}
-
-
-- (NSArray *)allKeys
-{
- return [_attributeIndex allKeys];
-}
-
-- (NSArray *)rangedAttributesForKey:(id)key
-{
- NSMutableArray *keyArray = [_attributeIndex objectForKey:key];
-
- return keyArray;
-}
-
-#pragma mark Properties
-@synthesize didMerge = _didMerge;
-@end
View
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.drobnik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,33 @@
+#import "CGUtils.h"
+#import "DTAttributedTextCell.h"
+#import "DTAttributedTextContentView.h"
+#import "DTAttributedTextView.h"
+#import "DTCSSListStyle.h"
+#import "DTCSSStylesheet.h"
+#import "DTCache.h"
+#import "DTCoreText.h"
+#import "DTCoreTextFontCollection.h"
+#import "DTCoreTextFontDescriptor.h"
+#import "DTCoreTextGlyphRun.h"
+#import "DTCoreTextLayoutFrame.h"
+#import "DTCoreTextLayoutLine.h"
+#import "DTCoreTextLayouter.h"
+#import "DTCoreTextParagraphStyle.h"
+#import "DTHTMLElement.h"
+#import "DTLazyImageView.h"
+#import "DTLinkButton.h"
+#import "DTTextAttachment.h"
+#import "DTWebVideoView.h"
+#import "NSAttributedString+DTWebArchive.h"
+#import "NSAttributedString+HTML.h"
+#import "NSAttributedStringRunDelegates.h"
+#import "NSCharacterSet+HTML.h"
+#import "NSData+Base64.h"
+#import "NSMutableAttributedString+HTML.h"
+#import "NSScanner+HTML.h"
+#import "NSString+HTML.h"
+#import "NSString+Paragraphs.h"
+#import "NSString+UTF8Cleaner.h"
+#import "NSURL+HTML.h"
+#import "UIColor+HTML.h"
+#import "UIDevice+DTVersion.h"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 22923a8

Please sign in to comment.