├── .gitignore ├── BeBold ├── BeBold.xcodeproj │ └── project.pbxproj └── BeBold │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── BeBold-Bridging-Header.h │ ├── BeBold-Info.plist │ ├── BeBold-Prefix.pch │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── ViewController.swift │ ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard │ └── main.m ├── BeBoldDT ├── BeBold │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── BeBoldDT-Info.plist │ ├── BeBoldDT-Prefix.pch │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ └── MainStoryboard.storyboard │ └── main.m ├── BeBoldDT.xcodeproj │ └── project.pbxproj ├── Podfile ├── Podfile.lock └── Pods │ ├── BuildHeaders │ ├── DTCoreText │ │ ├── DTAttributedLabel.h │ │ ├── DTAttributedTextCell.h │ │ ├── DTAttributedTextContentView.h │ │ ├── DTAttributedTextView.h │ │ ├── DTCSSListStyle.h │ │ ├── DTCSSStylesheet.h │ │ ├── DTColor+HTML.h │ │ ├── DTCompatibility.h │ │ ├── DTCoreText.h │ │ ├── DTCoreTextConstants.h │ │ ├── DTCoreTextFontCollection.h │ │ ├── DTCoreTextFontDescriptor.h │ │ ├── DTCoreTextFunctions.h │ │ ├── DTCoreTextGlyphRun.h │ │ ├── DTCoreTextLayoutFrame.h │ │ ├── DTCoreTextLayoutLine.h │ │ ├── DTCoreTextLayouter.h │ │ ├── DTCoreTextParagraphStyle.h │ │ ├── DTDictationPlaceholderTextAttachment.h │ │ ├── DTDictationPlaceholderView.h │ │ ├── DTHTMLAttributedStringBuilder.h │ │ ├── DTHTMLElement.h │ │ ├── DTHTMLElementAttachment.h │ │ ├── DTHTMLElementBR.h │ │ ├── DTHTMLElementHR.h │ │ ├── DTHTMLElementLI.h │ │ ├── DTHTMLElementStylesheet.h │ │ ├── DTHTMLElementText.h │ │ ├── DTHTMLParserNode.h │ │ ├── DTHTMLParserTextNode.h │ │ ├── DTHTMLWriter.h │ │ ├── DTImage+HTML.h │ │ ├── DTLazyImageView.h │ │ ├── DTLinkButton.h │ │ ├── DTTextAttachment.h │ │ ├── DTTextBlock.h │ │ ├── DTWebVideoView.h │ │ ├── NSAttributedString+DTCoreText.h │ │ ├── NSAttributedString+HTML.h │ │ ├── NSAttributedString+SmallCaps.h │ │ ├── NSAttributedStringRunDelegates.h │ │ ├── NSCharacterSet+HTML.h │ │ ├── NSMutableAttributedString+HTML.h │ │ ├── NSMutableString+HTML.h │ │ ├── NSScanner+HTML.h │ │ ├── NSString+CSS.h │ │ ├── NSString+HTML.h │ │ ├── NSString+Paragraphs.h │ │ └── UIFont+DTCoreText.h │ └── DTFoundation │ │ ├── DTASN1Parser.h │ │ ├── DTBase64Coding.h │ │ ├── DTExtendedFileAttributes.h │ │ ├── DTFoundationConstants.h │ │ ├── DTHTMLParser.h │ │ ├── DTObjectBlockExecutor.h │ │ ├── DTScriptExpression.h │ │ ├── DTScriptVariable.h │ │ ├── DTUtils.h │ │ ├── DTVersion.h │ │ ├── NSArray+DTError.h │ │ ├── NSData+DTCrypto.h │ │ ├── NSDictionary+DTError.h │ │ ├── NSFileWrapper+DTCopying.h │ │ ├── NSMutableArray+DTMoving.h │ │ ├── NSObject+DTRuntime.h │ │ ├── NSScanner+DTScripting.h │ │ ├── NSString+DTFormatNumbers.h │ │ ├── NSString+DTPaths.h │ │ ├── NSString+DTURLEncoding.h │ │ ├── NSString+DTUtilities.h │ │ ├── NSURL+DTComparing.h │ │ └── NSURL+DTUnshorten.h │ ├── DTCoreText │ ├── Core │ │ └── Source │ │ │ ├── DTAttributedLabel.h │ │ │ ├── DTAttributedLabel.m │ │ │ ├── DTAttributedTextCell.h │ │ │ ├── DTAttributedTextCell.m │ │ │ ├── DTAttributedTextContentView.h │ │ │ ├── DTAttributedTextContentView.m │ │ │ ├── DTAttributedTextView.h │ │ │ ├── DTAttributedTextView.m │ │ │ ├── DTCSSListStyle.h │ │ │ ├── DTCSSListStyle.m │ │ │ ├── DTCSSStylesheet.h │ │ │ ├── DTCSSStylesheet.m │ │ │ ├── DTColor+HTML.h │ │ │ ├── DTColor+HTML.m │ │ │ ├── DTCompatibility.h │ │ │ ├── DTCoreText.h │ │ │ ├── DTCoreTextConstants.h │ │ │ ├── DTCoreTextConstants.m │ │ │ ├── DTCoreTextFontCollection.h │ │ │ ├── DTCoreTextFontCollection.m │ │ │ ├── DTCoreTextFontDescriptor.h │ │ │ ├── DTCoreTextFontDescriptor.m │ │ │ ├── DTCoreTextFunctions.h │ │ │ ├── DTCoreTextFunctions.m │ │ │ ├── DTCoreTextGlyphRun.h │ │ │ ├── DTCoreTextGlyphRun.m │ │ │ ├── DTCoreTextLayoutFrame.h │ │ │ ├── DTCoreTextLayoutFrame.m │ │ │ ├── DTCoreTextLayoutLine.h │ │ │ ├── DTCoreTextLayoutLine.m │ │ │ ├── DTCoreTextLayouter.h │ │ │ ├── DTCoreTextLayouter.m │ │ │ ├── DTCoreTextParagraphStyle.h │ │ │ ├── DTCoreTextParagraphStyle.m │ │ │ ├── DTDictationPlaceholderTextAttachment.h │ │ │ ├── DTDictationPlaceholderTextAttachment.m │ │ │ ├── DTDictationPlaceholderView.h │ │ │ ├── DTDictationPlaceholderView.m │ │ │ ├── DTHTMLAttributedStringBuilder.h │ │ │ ├── DTHTMLAttributedStringBuilder.m │ │ │ ├── DTHTMLElement.h │ │ │ ├── DTHTMLElement.m │ │ │ ├── DTHTMLElementAttachment.h │ │ │ ├── DTHTMLElementAttachment.m │ │ │ ├── DTHTMLElementBR.h │ │ │ ├── DTHTMLElementBR.m │ │ │ ├── DTHTMLElementHR.h │ │ │ ├── DTHTMLElementHR.m │ │ │ ├── DTHTMLElementLI.h │ │ │ ├── DTHTMLElementLI.m │ │ │ ├── DTHTMLElementStylesheet.h │ │ │ ├── DTHTMLElementStylesheet.m │ │ │ ├── DTHTMLElementText.h │ │ │ ├── DTHTMLElementText.m │ │ │ ├── DTHTMLParserNode.h │ │ │ ├── DTHTMLParserNode.m │ │ │ ├── DTHTMLParserTextNode.h │ │ │ ├── DTHTMLParserTextNode.m │ │ │ ├── DTHTMLWriter.h │ │ │ ├── DTHTMLWriter.m │ │ │ ├── DTImage+HTML.h │ │ │ ├── DTImage+HTML.m │ │ │ ├── DTLazyImageView.h │ │ │ ├── DTLazyImageView.m │ │ │ ├── DTLinkButton.h │ │ │ ├── DTLinkButton.m │ │ │ ├── DTTextAttachment.h │ │ │ ├── DTTextAttachment.m │ │ │ ├── DTTextBlock.h │ │ │ ├── DTTextBlock.m │ │ │ ├── DTWebVideoView.h │ │ │ ├── DTWebVideoView.m │ │ │ ├── NSAttributedString+DTCoreText.h │ │ │ ├── NSAttributedString+DTCoreText.m │ │ │ ├── NSAttributedString+HTML.h │ │ │ ├── NSAttributedString+HTML.m │ │ │ ├── NSAttributedString+SmallCaps.h │ │ │ ├── NSAttributedString+SmallCaps.m │ │ │ ├── NSAttributedStringRunDelegates.h │ │ │ ├── NSAttributedStringRunDelegates.m │ │ │ ├── NSCharacterSet+HTML.h │ │ │ ├── NSCharacterSet+HTML.m │ │ │ ├── NSMutableAttributedString+HTML.h │ │ │ ├── NSMutableAttributedString+HTML.m │ │ │ ├── NSMutableString+HTML.h │ │ │ ├── NSMutableString+HTML.m │ │ │ ├── NSScanner+HTML.h │ │ │ ├── NSScanner+HTML.m │ │ │ ├── NSString+CSS.h │ │ │ ├── NSString+CSS.m │ │ │ ├── NSString+HTML.h │ │ │ ├── NSString+HTML.m │ │ │ ├── NSString+Paragraphs.h │ │ │ ├── NSString+Paragraphs.m │ │ │ ├── UIFont+DTCoreText.h │ │ │ ├── UIFont+DTCoreText.m │ │ │ ├── default.css │ │ │ └── default.css.c │ ├── DTCoreText.podspec │ ├── Demo │ │ └── Resources │ │ │ └── DTCoreTextFontOverrides.plist │ ├── LICENSE │ └── Readme.markdown │ ├── DTFoundation │ ├── Core │ │ └── Source │ │ │ ├── DTASN1Parser.h │ │ │ ├── DTASN1Parser.m │ │ │ ├── DTBase64Coding.h │ │ │ ├── DTBase64Coding.m │ │ │ ├── DTExtendedFileAttributes.h │ │ │ ├── DTExtendedFileAttributes.m │ │ │ ├── DTFoundationConstants.h │ │ │ ├── DTFoundationConstants.m │ │ │ ├── DTHTMLParser │ │ │ ├── DTHTMLParser.h │ │ │ └── DTHTMLParser.m │ │ │ ├── DTObjectBlockExecutor.h │ │ │ ├── DTObjectBlockExecutor.m │ │ │ ├── DTScriptExpression.h │ │ │ ├── DTScriptExpression.m │ │ │ ├── DTScriptVariable.h │ │ │ ├── DTScriptVariable.m │ │ │ ├── DTUtils.h │ │ │ ├── DTUtils.m │ │ │ ├── DTVersion.h │ │ │ ├── DTVersion.m │ │ │ ├── NSArray+DTError.h │ │ │ ├── NSArray+DTError.m │ │ │ ├── NSData+DTCrypto.h │ │ │ ├── NSData+DTCrypto.m │ │ │ ├── NSDictionary+DTError.h │ │ │ ├── NSDictionary+DTError.m │ │ │ ├── NSFileWrapper+DTCopying.h │ │ │ ├── NSFileWrapper+DTCopying.m │ │ │ ├── NSMutableArray+DTMoving.h │ │ │ ├── NSMutableArray+DTMoving.m │ │ │ ├── NSObject+DTRuntime.h │ │ │ ├── NSObject+DTRuntime.m │ │ │ ├── NSScanner+DTScripting.h │ │ │ ├── NSScanner+DTScripting.m │ │ │ ├── NSString+DTFormatNumbers.h │ │ │ ├── NSString+DTFormatNumbers.m │ │ │ ├── NSString+DTPaths.h │ │ │ ├── NSString+DTPaths.m │ │ │ ├── NSString+DTURLEncoding.h │ │ │ ├── NSString+DTURLEncoding.m │ │ │ ├── NSString+DTUtilities.h │ │ │ ├── NSString+DTUtilities.m │ │ │ ├── NSURL+DTComparing.h │ │ │ ├── NSURL+DTComparing.m │ │ │ ├── NSURL+DTUnshorten.h │ │ │ └── NSURL+DTUnshorten.m │ ├── DTFoundation.podspec │ ├── LICENSE │ └── readme.markdown │ ├── Headers │ ├── DTCoreText │ │ ├── DTAttributedLabel.h │ │ ├── DTAttributedTextCell.h │ │ ├── DTAttributedTextContentView.h │ │ ├── DTAttributedTextView.h │ │ ├── DTCSSListStyle.h │ │ ├── DTCSSStylesheet.h │ │ ├── DTColor+HTML.h │ │ ├── DTCompatibility.h │ │ ├── DTCoreText.h │ │ ├── DTCoreTextConstants.h │ │ ├── DTCoreTextFontCollection.h │ │ ├── DTCoreTextFontDescriptor.h │ │ ├── DTCoreTextFunctions.h │ │ ├── DTCoreTextGlyphRun.h │ │ ├── DTCoreTextLayoutFrame.h │ │ ├── DTCoreTextLayoutLine.h │ │ ├── DTCoreTextLayouter.h │ │ ├── DTCoreTextParagraphStyle.h │ │ ├── DTDictationPlaceholderTextAttachment.h │ │ ├── DTDictationPlaceholderView.h │ │ ├── DTHTMLAttributedStringBuilder.h │ │ ├── DTHTMLElement.h │ │ ├── DTHTMLElementAttachment.h │ │ ├── DTHTMLElementBR.h │ │ ├── DTHTMLElementHR.h │ │ ├── DTHTMLElementLI.h │ │ ├── DTHTMLElementStylesheet.h │ │ ├── DTHTMLElementText.h │ │ ├── DTHTMLParserNode.h │ │ ├── DTHTMLParserTextNode.h │ │ ├── DTHTMLWriter.h │ │ ├── DTImage+HTML.h │ │ ├── DTLazyImageView.h │ │ ├── DTLinkButton.h │ │ ├── DTTextAttachment.h │ │ ├── DTTextBlock.h │ │ ├── DTWebVideoView.h │ │ ├── NSAttributedString+DTCoreText.h │ │ ├── NSAttributedString+HTML.h │ │ ├── NSAttributedString+SmallCaps.h │ │ ├── NSAttributedStringRunDelegates.h │ │ ├── NSCharacterSet+HTML.h │ │ ├── NSMutableAttributedString+HTML.h │ │ ├── NSMutableString+HTML.h │ │ ├── NSScanner+HTML.h │ │ ├── NSString+CSS.h │ │ ├── NSString+HTML.h │ │ ├── NSString+Paragraphs.h │ │ └── UIFont+DTCoreText.h │ └── DTFoundation │ │ ├── DTASN1Parser.h │ │ ├── DTBase64Coding.h │ │ ├── DTExtendedFileAttributes.h │ │ ├── DTFoundationConstants.h │ │ ├── DTHTMLParser.h │ │ ├── DTObjectBlockExecutor.h │ │ ├── DTScriptExpression.h │ │ ├── DTScriptVariable.h │ │ ├── DTUtils.h │ │ ├── DTVersion.h │ │ ├── NSArray+DTError.h │ │ ├── NSData+DTCrypto.h │ │ ├── NSDictionary+DTError.h │ │ ├── NSFileWrapper+DTCopying.h │ │ ├── NSMutableArray+DTMoving.h │ │ ├── NSObject+DTRuntime.h │ │ ├── NSScanner+DTScripting.h │ │ ├── NSString+DTFormatNumbers.h │ │ ├── NSString+DTPaths.h │ │ ├── NSString+DTURLEncoding.h │ │ ├── NSString+DTUtilities.h │ │ ├── NSURL+DTComparing.h │ │ └── NSURL+DTUnshorten.h │ ├── Pods-Acknowledgements.markdown │ ├── Pods-Acknowledgements.plist │ ├── Pods-prefix.pch │ ├── Pods-resources.sh │ ├── Pods.xcconfig │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── PodsDummy_Pods.m ├── BeBoldMT ├── BeBold │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── BeBoldMT-Info.plist │ ├── BeBoldMT-Prefix.pch │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ └── MainStoryboard.storyboard │ └── main.m ├── BeBoldMT.xcodeproj │ └── project.pbxproj ├── Podfile ├── Podfile.lock └── Pods │ ├── BuildHeaders │ ├── MTStringAttributes │ │ ├── MTStringAttributes.h │ │ └── MTStringParser.h │ └── Slash │ │ ├── SLSErrors.h │ │ ├── SLSMarkupParser.h │ │ ├── SLSTagLexer.gen.h │ │ ├── SLSTagParser.gen.h │ │ ├── SLSTagParser.h │ │ ├── SLSTaggedRange.h │ │ └── Slash.h │ ├── Headers │ ├── MTStringAttributes │ │ ├── MTStringAttributes.h │ │ └── MTStringParser.h │ └── Slash │ │ ├── SLSErrors.h │ │ ├── SLSMarkupParser.h │ │ ├── SLSTagLexer.gen.h │ │ ├── SLSTagParser.gen.h │ │ ├── SLSTagParser.h │ │ ├── SLSTaggedRange.h │ │ └── Slash.h │ ├── Local Podspecs │ └── MTStringAttributes.podspec │ ├── MTStringAttributes │ ├── LICENSE │ ├── MTStringAttributes.podspec │ ├── MTStringAttributes │ │ ├── MTStringAttributes.h │ │ ├── MTStringAttributes.m │ │ ├── MTStringParser.h │ │ └── MTStringParser.m │ └── README.md │ ├── Pods-Acknowledgements.markdown │ ├── Pods-Acknowledgements.plist │ ├── Pods-prefix.pch │ ├── Pods-resources.sh │ ├── Pods.xcconfig │ ├── Pods.xcodeproj │ └── project.pbxproj │ ├── PodsDummy_Pods.m │ └── Slash │ ├── LICENCE │ ├── README.md │ ├── Slash.podspec │ └── Slash │ ├── SLSErrors.h │ ├── SLSMarkupParser.h │ ├── SLSMarkupParser.m │ ├── SLSTagLexer.gen.h │ ├── SLSTagLexer.gen.m │ ├── SLSTagParser.gen.h │ ├── SLSTagParser.gen.m │ ├── SLSTagParser.h │ ├── SLSTagParser.m │ ├── SLSTaggedRange.h │ ├── SLSTaggedRange.m │ └── Slash.h ├── Columns ├── Columns.xcodeproj │ └── project.pbxproj └── Columns │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── ColumnView.h │ ├── ColumnView.m │ ├── ColumnView.swift │ ├── Columns-Bridging-Header.h │ ├── Columns-Info.plist │ ├── Columns-Prefix.pch │ ├── Lipsum.txt │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard │ └── main.m ├── DrawText ├── DrawText.xcodeproj │ └── project.pbxproj └── DrawText │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── DrawText-Info.plist │ ├── DrawText-Prefix.pch │ ├── TextView.h │ ├── TextView.m │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard │ └── main.m ├── PinchText ├── Classes │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── PinchTextLayer.h │ ├── PinchTextLayer.m │ ├── PinchTextView.h │ ├── PinchTextView.m │ ├── TouchPoint.h │ └── TouchPoint.m ├── Lipsum.txt ├── MainWindow.xib ├── PinchText-Info.plist ├── PinchText.mov ├── PinchText.xcodeproj │ └── project.pbxproj ├── PinchText_Prefix.pch └── main.m ├── README.md ├── RTL ├── RTL.xcodeproj │ └── project.pbxproj └── RTL │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── RTL-Info.plist │ ├── RTL-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard │ └── main.m ├── Rich Text, Core Text 2.pdf └── Rich Text, Core Text.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /BeBold/BeBold/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /BeBold/BeBold/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BeBold/BeBold/BeBold-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /BeBold/BeBold/BeBold-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.robnapier.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BeBold/BeBold/BeBold-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BeBold' target in the 'BeBold' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /BeBold/BeBold/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBold/BeBold/Default-568h@2x.png -------------------------------------------------------------------------------- /BeBold/BeBold/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBold/BeBold/Default.png -------------------------------------------------------------------------------- /BeBold/BeBold/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBold/BeBold/Default@2x.png -------------------------------------------------------------------------------- /BeBold/BeBold/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BeBold/BeBold/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/BeBoldDT-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.robnapier.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/BeBoldDT-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BeBold' target in the 'BeBold' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBoldDT/BeBold/Default-568h@2x.png -------------------------------------------------------------------------------- /BeBoldDT/BeBold/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBoldDT/BeBold/Default.png -------------------------------------------------------------------------------- /BeBoldDT/BeBold/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBoldDT/BeBold/Default@2x.png -------------------------------------------------------------------------------- /BeBoldDT/BeBold/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | @property (weak, nonatomic) IBOutlet UILabel *label; 13 | @property (weak, nonatomic) IBOutlet UITextView *textView; 14 | - (IBAction)applyBold:(id)sender; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BeBoldDT/BeBold/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BeBoldDT/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '6.1' 2 | pod "DTCoreText" 3 | -------------------------------------------------------------------------------- /BeBoldDT/Podfile.lock: -------------------------------------------------------------------------------- 1 | 2 | PODS: 3 | - DTCoreText (1.3.2): 4 | - DTFoundation/Core (~> 1.1) 5 | - DTFoundation/DTHMLParser (~> 1.0) 6 | - DTFoundation/Core (1.1.0) 7 | - DTFoundation/DTHMLParser (1.1.0): 8 | - DTFoundation/Core 9 | 10 | DEPENDENCIES: 11 | - DTCoreText 12 | 13 | SPEC CHECKSUMS: 14 | DTCoreText: ea0506fd102311311da09a3842170ce07f0a1b29 15 | DTFoundation/Core: d84efdb26b073826cc526d3b00fcbb5b47ffe176 16 | DTFoundation/DTHMLParser: d84efdb26b073826cc526d3b00fcbb5b47ffe176 17 | 18 | COCOAPODS: 0.16.4 19 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTAttributedLabel.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedLabel.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTAttributedTextCell.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedTextCell.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTAttributedTextContentView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedTextContentView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTAttributedTextView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedTextView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCSSListStyle.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCSSListStyle.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCSSStylesheet.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCSSStylesheet.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTColor+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTColor+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCompatibility.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCompatibility.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextConstants.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextConstants.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextFontCollection.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextFontCollection.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextFontDescriptor.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextFontDescriptor.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextFunctions.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextFunctions.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextGlyphRun.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextGlyphRun.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextLayoutFrame.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutLine.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextLayoutLine.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextLayouter.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextLayouter.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTCoreTextParagraphStyle.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextParagraphStyle.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderTextAttachment.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTDictationPlaceholderTextAttachment.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTDictationPlaceholderView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLAttributedStringBuilder.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLAttributedStringBuilder.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElement.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElement.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElementAttachment.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementAttachment.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElementBR.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementBR.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElementHR.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementHR.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElementLI.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementLI.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElementStylesheet.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementStylesheet.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLElementText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLParserNode.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLParserNode.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLParserTextNode.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLParserTextNode.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTHTMLWriter.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLWriter.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTImage+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTImage+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTLazyImageView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTLazyImageView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTLinkButton.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTLinkButton.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTTextAttachment.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTTextAttachment.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTTextBlock.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTTextBlock.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/DTWebVideoView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTWebVideoView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTCoreText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedString+DTCoreText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSAttributedString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSAttributedString+SmallCaps.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedString+SmallCaps.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSAttributedStringRunDelegates.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedStringRunDelegates.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSCharacterSet+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSCharacterSet+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSMutableAttributedString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSMutableAttributedString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSMutableString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSMutableString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSScanner+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSScanner+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSString+CSS.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSString+CSS.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/NSString+Paragraphs.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSString+Paragraphs.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTCoreText/UIFont+DTCoreText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/UIFont+DTCoreText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTASN1Parser.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTASN1Parser.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTBase64Coding.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTBase64Coding.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTExtendedFileAttributes.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTExtendedFileAttributes.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTFoundationConstants.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTFoundationConstants.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTHTMLParser.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTHTMLParser/DTHTMLParser.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTObjectBlockExecutor.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTObjectBlockExecutor.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTScriptExpression.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTScriptExpression.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTScriptVariable.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTScriptVariable.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTUtils.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTUtils.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/DTVersion.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTVersion.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSArray+DTError.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSArray+DTError.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSData+DTCrypto.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSData+DTCrypto.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSDictionary+DTError.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSDictionary+DTError.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSFileWrapper+DTCopying.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSFileWrapper+DTCopying.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSMutableArray+DTMoving.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSMutableArray+DTMoving.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSObject+DTRuntime.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSObject+DTRuntime.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSScanner+DTScripting.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSScanner+DTScripting.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSString+DTFormatNumbers.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTFormatNumbers.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSString+DTPaths.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTPaths.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSString+DTURLEncoding.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTURLEncoding.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSString+DTUtilities.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTUtilities.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSURL+DTComparing.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSURL+DTComparing.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/BuildHeaders/DTFoundation/NSURL+DTUnshorten.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSURL+DTUnshorten.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTAttributedLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTAttributedLabel.h 3 | // DTCoreText 4 | // 5 | // Created by Brian Kenny on 1/17/13. 6 | // Copyright (c) 2013 Cocoanetics.com. All rights reserved. 7 | // 8 | 9 | #import "DTAttributedTextContentView.h" 10 | 11 | /** 12 | A Rich Text replacement for `UILabel`. It inherits from and as such you can also set the delegate to provide custom subviews i.e. for images or hyperlinks. 13 | */ 14 | 15 | @interface DTAttributedLabel : DTAttributedTextContentView 16 | 17 | /** 18 | @name Setting Attributes 19 | */ 20 | 21 | /** 22 | The number of lines to display in the receiver 23 | */ 24 | @property(nonatomic, assign) NSInteger numberOfLines; 25 | 26 | /** 27 | The line break mode of the receiver 28 | */ 29 | @property(nonatomic, assign) NSLineBreakMode lineBreakMode; 30 | 31 | /** 32 | The string to append to the visible string in case a trunction occurs 33 | */ 34 | @property(nonatomic, strong) NSAttributedString *truncationString; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTAttributedLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTAttributedLabel.m 3 | // DTCoreText 4 | // 5 | // Created by Brian Kenny on 1/17/13. 6 | // Copyright (c) 2013 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTAttributedLabel.h" 10 | #import "DTCoreTextLayoutFrame.h" 11 | 12 | @implementation DTAttributedLabel 13 | 14 | - (DTCoreTextLayoutFrame *)layoutFrame 15 | { 16 | self.layoutFrameHeightIsConstrainedByBounds = YES; // height is not flexible 17 | DTCoreTextLayoutFrame * layoutFrame = [super layoutFrame]; 18 | layoutFrame.numberOfLines = self.numberOfLines; 19 | layoutFrame.lineBreakMode = self.lineBreakMode; 20 | layoutFrame.truncationString = self.truncationString; 21 | layoutFrame.noLeadingOnFirstLine = YES; 22 | return layoutFrame; 23 | } 24 | 25 | - (id)initWithFrame:(CGRect)frame 26 | { 27 | self = [super initWithFrame:frame]; 28 | 29 | if (self) 30 | { 31 | // we want to relayout the text if height or width change 32 | self.relayoutMask = DTAttributedTextContentViewRelayoutOnHeightChanged | DTAttributedTextContentViewRelayoutOnWidthChanged; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | #pragma mark - Properties 39 | 40 | - (void)setNumberOfLines:(NSInteger)numberOfLines 41 | { 42 | if (numberOfLines != _numberOfLines) 43 | { 44 | _numberOfLines = numberOfLines; 45 | [self relayoutText]; 46 | } 47 | } 48 | 49 | - (void)setLineBreakMode:(NSLineBreakMode)lineBreakMode 50 | { 51 | if (lineBreakMode != _lineBreakMode) 52 | { 53 | _lineBreakMode = lineBreakMode; 54 | [self relayoutText]; 55 | } 56 | } 57 | 58 | - (void)setTruncationString:(NSAttributedString *)trunctionString 59 | { 60 | if (trunctionString != _truncationString) 61 | { 62 | _truncationString = trunctionString; 63 | [self relayoutText]; 64 | } 65 | } 66 | 67 | - (void)sizeToFit 68 | { 69 | CGSize size = [self suggestedFrameSizeToFitEntireStringConstraintedToWidth:CGFLOAT_OPEN_HEIGHT]; 70 | self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, size.width, size.height); 71 | } 72 | 73 | @synthesize numberOfLines = _numberOfLines; 74 | @synthesize lineBreakMode = _lineBreakMode; 75 | @synthesize truncationString = _truncationString; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCSSStylesheet.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCSSStylesheet.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 9/5/11. 6 | // Copyright (c) 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DTHTMLElement; 12 | 13 | /** 14 | This class represents a CSS style sheet used for specifying formatting for certain CSS selectors. 15 | 16 | It supports matching styles by class, by id or by tag name. Hierarchy matching is not supported yet. 17 | */ 18 | @interface DTCSSStylesheet : NSObject 19 | 20 | 21 | /** 22 | @name Creating Stylesheets 23 | */ 24 | 25 | /** 26 | Creates the default stylesheet. 27 | 28 | This stylesheet is based on the standard styles that Webkit provides for these tags. This stylesheet is loaded from an embedded copy of default.css. 29 | */ 30 | + (DTCSSStylesheet *)defaultStyleSheet; 31 | 32 | 33 | /** 34 | Creates a stylesheet with a given style block 35 | 36 | @param css The CSS string for the style block 37 | */ 38 | - (id)initWithStyleBlock:(NSString *)css; 39 | 40 | 41 | /** 42 | @name Working with CSS Style Blocks 43 | */ 44 | 45 | 46 | /** 47 | Parses a style block string and adds the found style rules to the receiver. 48 | 49 | @param css The CSS string for the style block 50 | */ 51 | - (void)parseStyleBlock:(NSString *)css; 52 | 53 | 54 | /** 55 | Merges styles from given stylesheet into the receiver 56 | 57 | @param stylesheet the stylesheet to merge 58 | */ 59 | - (void)mergeStylesheet:(DTCSSStylesheet *)stylesheet; 60 | 61 | 62 | /** 63 | @name Accessing Style Information 64 | */ 65 | 66 | /** 67 | Returns a dictionary that contains the merged style for a given element and the applicable style rules from the receiver. 68 | 69 | @param element The HTML element. 70 | @returns The merged style dictionary containing only styles which selector matches the element 71 | */ 72 | - (NSDictionary *)mergedStyleDictionaryForElement:(DTHTMLElement *)element; 73 | 74 | 75 | /** 76 | Returns a dictionary of the styles of the receiver 77 | */ 78 | - (NSDictionary *)styles; 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCompatibility.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCompatibility.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Letterer on 09.04.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | // DTColor is UIColor on iOS, NSColor on Mac 10 | #if TARGET_OS_IPHONE 11 | @compatibility_alias DTColor UIColor; 12 | #else 13 | @compatibility_alias DTColor NSColor; 14 | #endif 15 | 16 | // DTImage is UIImage on iOS, NSImage on Mac 17 | #if TARGET_OS_IPHONE 18 | @compatibility_alias DTImage UIImage; 19 | #else 20 | @compatibility_alias DTImage NSImage; 21 | #endif 22 | 23 | // DTFont is UIFont on iOS, NSFont on Mac 24 | #if TARGET_OS_IPHONE 25 | @compatibility_alias DTFont UIFont; 26 | #else 27 | @compatibility_alias DTFont NSFont; 28 | #endif 29 | 30 | // DTEdgeInsets is UIEdgeInsets on iOS, NSEdgeInsets on Mac 31 | #if TARGET_OS_IPHONE 32 | #define DTEdgeInsets UIEdgeInsets 33 | #define DTEdgeInsetsMake(a, b, c, d) UIEdgeInsetsMake(a, b, c, d) 34 | #else 35 | #define DTEdgeInsets NSEdgeInsets 36 | #define DTEdgeInsetsMake(a, b, c, d) NSEdgeInsetsMake(a, b, c, d) 37 | 38 | // These may be out of place here. Feel free to move them! 39 | // Sourced from https://github.com/andrep/RMModelObject 40 | static inline NSString* NSStringFromCGRect(const CGRect rect) 41 | { 42 | return NSStringFromRect(NSRectFromCGRect(rect)); 43 | } 44 | 45 | static inline NSString* NSStringFromCGSize(const CGSize size) 46 | { 47 | return NSStringFromSize(NSSizeFromCGSize(size)); 48 | } 49 | 50 | static inline NSString* NSStringFromCGPoint(const CGPoint point) 51 | { 52 | return NSStringFromPoint(NSPointFromCGPoint(point)); 53 | } 54 | 55 | #define NSTextAlignmentLeft NSLeftTextAlignment 56 | #define NSTextAlignmentRight NSRightTextAlignment 57 | #define NSTextAlignmentCenter NSCenterTextAlignment 58 | #define NSTextAlignmentJustified NSJustifiedTextAlignment 59 | #define NSTextAlignmentNatural NSNaturalTextAlignment 60 | 61 | #endif -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCoreText.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_IPHONE 2 | #import 3 | #elif TARGET_OS_MAC 4 | #import 5 | #endif 6 | 7 | // global constants 8 | #import "DTCoreTextConstants.h" 9 | #import "DTCompatibility.h" 10 | 11 | #import "DTColor+HTML.h" 12 | #import "DTImage+HTML.h" 13 | 14 | // common utilities 15 | #import "DTUtils.h" 16 | #if TARGET_OS_IPHONE 17 | #import "DTCoreTextFunctions.h" 18 | #endif 19 | 20 | // common classes 21 | #import "DTCSSListStyle.h" 22 | #import "DTTextBlock.h" 23 | #import "DTCSSStylesheet.h" 24 | #import "DTCoreTextFontDescriptor.h" 25 | #import "DTHTMLElement.h" 26 | #import "DTTextAttachment.h" 27 | #import "NSCharacterSet+HTML.h" 28 | #import "NSScanner+HTML.h" 29 | #import "NSMutableString+HTML.h" 30 | #import "NSString+CSS.h" 31 | #import "NSString+HTML.h" 32 | #import "NSString+Paragraphs.h" 33 | #import "DTCoreTextParagraphStyle.h" 34 | #import "NSMutableAttributedString+HTML.h" 35 | #import "NSAttributedString+HTML.h" 36 | #import "NSAttributedString+SmallCaps.h" 37 | #import "NSAttributedString+DTCoreText.h" 38 | #import "DTHTMLAttributedStringBuilder.h" 39 | 40 | // parsing classes 41 | #import "DTHTMLParserNode.h" 42 | #import "DTHTMLParserTextNode.h" 43 | 44 | 45 | // These classes only work with UIKit on iOS 46 | #if TARGET_OS_IPHONE 47 | 48 | #import "DTLazyImageView.h" 49 | #import "DTLinkButton.h" 50 | #import "DTWebVideoView.h" 51 | #import "NSAttributedStringRunDelegates.h" 52 | 53 | #import "DTAttributedLabel.h" 54 | #import "DTAttributedTextCell.h" 55 | #import "DTAttributedTextContentView.h" 56 | #import "DTAttributedTextView.h" 57 | #import "DTCoreTextFontCollection.h" 58 | #import "DTCoreTextGlyphRun.h" 59 | #import "DTCoreTextLayoutFrame.h" 60 | #import "DTCoreTextLayoutLine.h" 61 | #import "DTCoreTextLayouter.h" 62 | 63 | #import "DTDictationPlaceholderTextAttachment.h" 64 | #import "DTDictationPlaceholderView.h" 65 | 66 | #import "UIFont+DTCoreText.h" 67 | 68 | #endif 69 | 70 | 71 | #define DT_ADD_FONT_ON_ATTACHMENTS 72 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCoreTextFontCollection.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCoreTextFontCollection.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 5/23/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | 10 | 11 | @class DTCoreTextFontDescriptor; 12 | 13 | /** 14 | Class representing a collection of fonts 15 | */ 16 | 17 | @interface DTCoreTextFontCollection : NSObject 18 | 19 | /** 20 | @name Creating Font Collections 21 | */ 22 | 23 | /** 24 | Creates a font collection with all available fonts on the system 25 | */ 26 | + (DTCoreTextFontCollection *)availableFontsCollection; 27 | 28 | /** 29 | @name Getting Information about Font Collections 30 | */ 31 | 32 | /** 33 | The font family names that occur in the receiver's list of fonts 34 | */ 35 | - (NSArray *)fontFamilyNames; 36 | 37 | /** 38 | The font descriptors describing all fonts in the receiver's font collection 39 | */ 40 | - (NSArray *)fontDescriptors; 41 | 42 | /** 43 | @name Searching for Fonts 44 | */ 45 | 46 | /** 47 | The font descriptor describing a font in the receiver's collection that matches a given descriptor 48 | @param descriptor The font descriptor to search for 49 | @returns The first found font descriptor in the font collection 50 | */ 51 | - (DTCoreTextFontDescriptor *)matchingFontDescriptorForFontDescriptor:(DTCoreTextFontDescriptor *)descriptor; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCoreTextFunctions.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCoreTextFunctions.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 21.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #if TARGET_OS_IPHONE 10 | /** 11 | Creates a CTFont from a UIFont 12 | @param font The `UIFont` 13 | @returns The matching CTFont 14 | */ 15 | CTFontRef DTCTFontCreateWithUIFont(UIFont *font); 16 | #endif 17 | 18 | /** 19 | Converts an NSLineBreakMode into CoreText line truncation type 20 | */ 21 | CTLineTruncationType DTCTLineTruncationTypeFromNSLineBreakMode(NSLineBreakMode lineBreakMode); 22 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCoreTextFunctions.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTCoreTextFunctions.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 21.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTCoreTextFunctions.h" 10 | 11 | #if TARGET_OS_IPHONE 12 | CTFontRef DTCTFontCreateWithUIFont(UIFont *font) 13 | { 14 | return CTFontCreateWithName((__bridge CFStringRef)font.fontName, font.pointSize, NULL); 15 | } 16 | #endif 17 | 18 | CTLineTruncationType DTCTLineTruncationTypeFromNSLineBreakMode(NSLineBreakMode lineBreakMode) 19 | { 20 | #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 21 | switch (lineBreakMode) 22 | { 23 | case UILineBreakModeHeadTruncation: 24 | return kCTLineTruncationStart; 25 | 26 | case UILineBreakModeMiddleTruncation: 27 | return kCTLineTruncationMiddle; 28 | 29 | default: 30 | return kCTLineTruncationEnd; 31 | } 32 | #else 33 | switch (lineBreakMode) 34 | { 35 | case NSLineBreakByTruncatingHead: 36 | return kCTLineTruncationStart; 37 | 38 | case NSLineBreakByTruncatingMiddle: 39 | return kCTLineTruncationMiddle; 40 | 41 | default: 42 | return kCTLineTruncationEnd; 43 | } 44 | #endif 45 | } 46 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTCoreTextLayouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCoreTextLayouter.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 1/24/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | 10 | 11 | #if TARGET_OS_IPHONE 12 | #import 13 | #elif TARGET_OS_MAC 14 | #import 15 | #endif 16 | 17 | #import "DTCoreTextLayoutFrame.h" 18 | #import "DTCoreTextLayoutLine.h" 19 | #import "DTCoreTextGlyphRun.h" 20 | 21 | /** 22 | This class owns an attributed string and is able to create layoutFrames for certain ranges in this string. Optionally it caches these layout frames. 23 | */ 24 | @interface DTCoreTextLayouter : NSObject 25 | 26 | /** 27 | @name Creating a Layouter 28 | */ 29 | 30 | /** 31 | Designated Initializer. Creates a new Layouter with an attributed string 32 | @param attributedString The `NSAttributedString` to layout for 33 | @returns An initialized layouter 34 | */ 35 | - (id)initWithAttributedString:(NSAttributedString *)attributedString; 36 | 37 | 38 | /** 39 | @name Creating Layout Frames 40 | */ 41 | 42 | /** 43 | Creates a layout frame with a given rectangle and string range. The layouter fills the layout frame with as many lines as fit. You can query [DTCoreTextLayoutFrame visibleStringRange] for the range the fits and create another layout frame that continues the text from there to create multiple pages, for example for an e-book. 44 | @param frame The rectangle to fill with text 45 | @param range The string range to fill, pass {0,0} for the entire string (as much as fits) 46 | */ 47 | - (DTCoreTextLayoutFrame *)layoutFrameWithRect:(CGRect)frame range:(NSRange)range; 48 | 49 | /** 50 | If set to `YES` then the receiver will cache layout frames generated with layoutFrameWithRect:range: for a given rect 51 | */ 52 | @property (nonatomic, assign) BOOL shouldCacheLayoutFrames; 53 | 54 | 55 | /** 56 | @name Getting Information 57 | */ 58 | 59 | /** 60 | The attributed string that the layouter currently owns 61 | */ 62 | @property (nonatomic, strong) NSAttributedString *attributedString; 63 | 64 | /** 65 | The internal framesetter of the receiver 66 | */ 67 | @property (nonatomic, readonly) CTFramesetterRef framesetter; 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTDictationPlaceholderTextAttachment.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTDictationPlaceholderTextAttachment.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 06.02.13. 6 | // Copyright (c) 2013 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTTextAttachment.h" 10 | 11 | /** 12 | This is a special subclass of DTTextAttachment used to represent the dictation placeholder. 13 | 14 | When encountering such an element DTAttributedTextContentView does not call the delegate to provide a subclass but automatically creates and adds a DTDictationPlaceholderView. 15 | */ 16 | 17 | @interface DTDictationPlaceholderTextAttachment : DTTextAttachment 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTDictationPlaceholderTextAttachment.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTDictationPlaceholderTextAttachment.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 06.02.13. 6 | // Copyright (c) 2013 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTDictationPlaceholderTextAttachment.h" 10 | 11 | @implementation DTDictationPlaceholderTextAttachment 12 | 13 | // if you change any of these then also make sure to adjust the sizes in DTDictationPlaceholderTextAttachment 14 | #define DOT_WIDTH 10.0f 15 | #define DOT_DISTANCE 2.5f 16 | #define DOT_OUTSIDE_MARGIN 3.0f 17 | 18 | // several hard-coded items 19 | - (CGSize)displaySize 20 | { 21 | return CGSizeMake(DOT_OUTSIDE_MARGIN*2.0f + DOT_WIDTH*3.0f + DOT_DISTANCE*2.0f, DOT_OUTSIDE_MARGIN*2.0f + DOT_WIDTH); 22 | } 23 | 24 | - (CGSize)originalSize 25 | { 26 | return [self displaySize]; 27 | } 28 | 29 | - (DTTextAttachmentType)contentType 30 | { 31 | return DTTextAttachmentTypeGeneric; 32 | } 33 | 34 | - (CGFloat)ascentForLayout 35 | { 36 | return self.displaySize.height; 37 | } 38 | 39 | - (CGFloat)descentForLayout 40 | { 41 | return 0.0f; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTDictationPlaceholderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTDictationPlaceholderView.h 3 | // DTRichTextEditor 4 | // 5 | // Created by Oliver Drobnik on 05.02.13. 6 | // Copyright (c) 2013 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | A dictation placeholder to display in editors between the time the recording is complete until a recognized response is received. 13 | */ 14 | 15 | @interface DTDictationPlaceholderView : UIView 16 | 17 | /** 18 | Creates an appropriately sized DTDictationPlaceholderView with 3 animated purple dots 19 | */ 20 | + (DTDictationPlaceholderView *)placeholderView; 21 | 22 | /** 23 | The context of the receiver. This can be any object, for example the selection range to replace with the dictation result text 24 | */ 25 | @property (nonatomic, strong) id context; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLAttributedStringBuilder.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLAttributedStringBuilder.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 21.01.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLParser.h" 10 | 11 | @class DTHTMLElement; 12 | 13 | typedef void(^DTHTMLAttributedStringBuilderWillFlushCallback)(DTHTMLElement *); 14 | 15 | 16 | /** 17 | Class for building an `NSAttributedString` from an HTML document. 18 | */ 19 | @interface DTHTMLAttributedStringBuilder : NSObject 20 | 21 | /** 22 | @name Creating an Attributed String Builder 23 | */ 24 | 25 | /** 26 | Initializes and returns a new `NSAttributedString` object from the HTML contained in the given object and base URL. 27 | @param data The data in HTML format from which to create the attributed string. 28 | @param options Specifies how the document should be loaded. Contains values described in NSAttributedString(HTML). 29 | @param docAttributes Currently not in used. 30 | @returns Returns an initialized object, or `nil` if the data can’t be decoded. 31 | */ 32 | - (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttributes:(NSDictionary **)docAttributes; 33 | 34 | 35 | /** 36 | @name Generating Attributed Strings 37 | */ 38 | 39 | /** 40 | Creates the attributed string when called the first time. 41 | @returns An `NSAttributedString` representing the HTML document passed in the initializer. 42 | */ 43 | - (NSAttributedString *)generatedAttributedString; 44 | 45 | 46 | /** 47 | This block is called before the element is written to the output attributed string 48 | */ 49 | @property (nonatomic, copy) DTHTMLAttributedStringBuilderWillFlushCallback willFlushCallback; 50 | 51 | /** 52 | Setting this property to `YES` causes the tree of parse nodes to be preserved until the end of the generation process. This allows to output the HTML structure of the document for debugging. 53 | */ 54 | @property (nonatomic, assign) BOOL shouldKeepDocumentNodeTree; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementAttachment.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementAttachment.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElement.h" 10 | 11 | /** 12 | Specialized subclass of for dealing with instances, e.g. images. 13 | */ 14 | 15 | @interface DTHTMLElementAttachment : DTHTMLElement 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementAttachment.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementAttachment.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElementAttachment.h" 10 | 11 | #import "DTHTMLElement.h" 12 | #import "DTTextAttachment.h" 13 | #import "DTCoreTextParagraphStyle.h" 14 | #import "NSMutableAttributedString+HTML.h" 15 | 16 | @implementation DTHTMLElementAttachment 17 | 18 | - (id)initWithName:(NSString *)name attributes:(NSDictionary *)attributes options:(NSDictionary *)options 19 | { 20 | self = [super initWithName:name attributes:attributes]; 21 | 22 | if (self) 23 | { 24 | // make appropriate attachment 25 | DTTextAttachment *attachment = [DTTextAttachment textAttachmentWithElement:self options:options]; 26 | 27 | // add it to tag 28 | _textAttachment = attachment; 29 | 30 | // to avoid much too much space before the image 31 | _paragraphStyle.lineHeightMultiple = 1; 32 | 33 | // specifiying line height interfers with correct positioning 34 | _paragraphStyle.minimumLineHeight = 0; 35 | _paragraphStyle.maximumLineHeight = 0; 36 | } 37 | 38 | return self; 39 | } 40 | 41 | - (NSAttributedString *)attributedString 42 | { 43 | @synchronized(self) 44 | { 45 | NSDictionary *attributes = [self attributesDictionary]; 46 | 47 | // ignore text, use unicode object placeholder 48 | NSMutableAttributedString *tmpString = [[NSMutableAttributedString alloc] initWithString:UNICODE_OBJECT_PLACEHOLDER attributes:attributes]; 49 | 50 | // block-level elements get space trimmed and a newline 51 | if (self.displayStyle != DTHTMLElementDisplayStyleInline) 52 | { 53 | [tmpString appendString:@"\n"]; 54 | } 55 | 56 | return tmpString; 57 | } 58 | } 59 | 60 | // workaround, because we don't support float yet. float causes the image to be its own block 61 | - (DTHTMLElementDisplayStyle)displayStyle 62 | { 63 | if ([super floatStyle]==DTHTMLElementFloatStyleNone) 64 | { 65 | return [super displayStyle]; 66 | } 67 | 68 | return DTHTMLElementDisplayStyleBlock; 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementBR.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementBR.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElement.h" 10 | 11 | /** 12 | Specialized subclass of that represents a line break. 13 | */ 14 | 15 | @interface DTHTMLElementBR : DTHTMLElement 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementBR.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementBR.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElementBR.h" 10 | 11 | @implementation DTHTMLElementBR 12 | 13 | - (NSAttributedString *)attributedString 14 | { 15 | @synchronized(self) 16 | { 17 | NSDictionary *attributes = [self attributesDictionary]; 18 | return [[NSAttributedString alloc] initWithString:UNICODE_LINE_FEED attributes:attributes]; 19 | } 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementHR.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementHR.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElement.h" 10 | 11 | /** 12 | Specialized subclass of that deals with list items. 13 | */ 14 | 15 | @interface DTHTMLElementHR : DTHTMLElement 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementHR.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementHR.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElementHR.h" 10 | 11 | @implementation DTHTMLElementHR 12 | 13 | - (NSDictionary *)attributesDictionary 14 | { 15 | NSMutableDictionary *dict = [[super attributesDictionary] mutableCopy]; 16 | [dict setObject:[NSNumber numberWithBool:YES] forKey:DTHorizontalRuleStyleAttribute]; 17 | 18 | return dict; 19 | } 20 | 21 | - (NSAttributedString *)attributedString 22 | { 23 | @synchronized(self) 24 | { 25 | NSDictionary *attributes = [self attributesDictionary]; 26 | return [[NSAttributedString alloc] initWithString:@"\n" attributes:attributes]; 27 | } 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementLI.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementLI.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 27.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTCoreText.h" 10 | 11 | /** 12 | Specialized subclass of that deals with list items. 13 | */ 14 | @interface DTHTMLElementLI : DTHTMLElement 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementStylesheet.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementStylesheet.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 29.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElement.h" 10 | 11 | @class DTCSSStylesheet; 12 | 13 | /** 14 | This is a specialized subclass of representing a style block. 15 | */ 16 | @interface DTHTMLElementStylesheet : DTHTMLElement 17 | 18 | /** 19 | Parses the text children and assembles the resulting stylesheet. 20 | */ 21 | - (DTCSSStylesheet *)stylesheet; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementStylesheet.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementStylesheet.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 29.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElementStylesheet.h" 10 | #import "DTCSSStylesheet.h" 11 | 12 | @implementation DTHTMLElementStylesheet 13 | 14 | - (NSAttributedString *)attributedString 15 | { 16 | return nil; 17 | } 18 | 19 | - (DTCSSStylesheet *)stylesheet 20 | { 21 | NSString *text = [self text]; 22 | 23 | return [[DTCSSStylesheet alloc] initWithStyleBlock:text]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLElementText.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLElementText.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLElement.h" 10 | 11 | /** 12 | Specialized subclass of that deals with text. 13 | */ 14 | 15 | @interface DTHTMLElementText : DTHTMLElement 16 | 17 | /** 18 | The text content of the element. 19 | */ 20 | @property (nonatomic, strong) NSString *text; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLParserNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLParserNode.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DTHTMLParserTextNode; 12 | 13 | /** 14 | This class represents one node in an HTML DOM tree. 15 | */ 16 | @interface DTHTMLParserNode : NSObject 17 | { 18 | NSDictionary *_attributes; 19 | } 20 | 21 | /** 22 | Designated initializer 23 | @param name The element name 24 | @param attributes The attributes dictionary 25 | @returns An initialized parser node. 26 | */ 27 | - (id)initWithName:(NSString *)name attributes:(NSDictionary *)attributes; 28 | 29 | /** 30 | The name of the receiver 31 | */ 32 | @property (nonatomic, copy) NSString *name; 33 | 34 | /** 35 | The attributes of the receiver. 36 | */ 37 | @property (nonatomic, copy) NSDictionary *attributes; 38 | 39 | /** 40 | A weak link to the parent node of the receiver 41 | */ 42 | @property (nonatomic, assign) DTHTMLParserNode *parentNode; 43 | 44 | /** 45 | The child nodes of the receiver 46 | */ 47 | @property (nonatomic, readonly) NSArray *childNodes; 48 | 49 | /** 50 | Adds a child node to the receiver. 51 | @param childNode The child node to be appended to the list of children 52 | */ 53 | - (void)addChildNode:(DTHTMLParserNode *)childNode; 54 | 55 | /** 56 | Removes a child node from the receiver 57 | @param childNode The child node to remove 58 | */ 59 | - (void)removeChildNode:(DTHTMLParserNode *)childNode; 60 | 61 | /** 62 | Removes all child nodes from the receiver 63 | */ 64 | - (void)removeAllChildNodes; 65 | 66 | /** 67 | Hierarchy representation of the receiver including all attributes and children 68 | */ 69 | - (NSString *)debugDescription; 70 | 71 | /** 72 | Concatenated contents of all text nodes 73 | */ 74 | - (NSString *)text; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLParserTextNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLParserTextNode.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLParserNode.h" 10 | 11 | /** 12 | Specialized sub class of that represents text inside a node 13 | */ 14 | @interface DTHTMLParserTextNode : DTHTMLParserNode 15 | 16 | /** 17 | Designated initializer with the characters that make up the text. 18 | @param characters The characters of the string 19 | @returns The initialized text node 20 | */ 21 | - (id)initWithCharacters:(NSString *)characters; 22 | 23 | /** 24 | Returns the receivers character contents 25 | */ 26 | @property (nonatomic, readonly) NSString *characters; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTHTMLParserTextNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTHTMLParserTextNode.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 26.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTHTMLParserTextNode.h" 10 | #import "NSString+HTML.h" 11 | 12 | @implementation DTHTMLParserTextNode 13 | { 14 | NSString *_characters; 15 | } 16 | 17 | - (id)initWithCharacters:(NSString *)characters 18 | { 19 | self = [super init]; 20 | 21 | if (self) 22 | { 23 | self.name = @"#TEXT#"; 24 | 25 | _characters = characters; 26 | 27 | } 28 | return self; 29 | } 30 | 31 | - (NSString *)description 32 | { 33 | return [NSString stringWithFormat:@"<%@ content='%@'>", NSStringFromClass([self class]), _characters]; 34 | } 35 | 36 | - (void)_appendHTMLToString:(NSMutableString *)string indentLevel:(NSUInteger)indentLevel 37 | { 38 | // indent to the level 39 | for (int i=0; i 11 | 12 | @class DTLazyImageView; 13 | 14 | // Notifications 15 | extern NSString * const DTLazyImageViewWillStartDownloadNotification; 16 | extern NSString * const DTLazyImageViewDidFinishDownloadNotification; 17 | 18 | /** 19 | Protocol for delegates of to inform them about the downloaded image dimensions. 20 | */ 21 | @protocol DTLazyImageViewDelegate 22 | @optional 23 | 24 | /** 25 | Method that informs the delegate about the image size so that it can re-layout text. 26 | @param lazyImageView The image view 27 | @param size The image size that is now known 28 | */ 29 | - (void)lazyImageView:(DTLazyImageView *)lazyImageView didChangeImageSize:(CGSize)size; 30 | @end 31 | 32 | /** 33 | This `UIImageView` subclass lazily loads an image from a URL and informs a delegate once the size of the image is known. 34 | */ 35 | 36 | @interface DTLazyImageView : UIImageView 37 | 38 | /** 39 | @name Providing Content 40 | */ 41 | 42 | /** 43 | The URL of the remote image 44 | */ 45 | @property (nonatomic, strong) NSURL *url; 46 | 47 | /** 48 | The URL Request that is to be used for downloading the image. If this is left `nil` the a new URL Request will be created 49 | */ 50 | @property (nonatomic, strong) NSMutableURLRequest *urlRequest; 51 | 52 | /** 53 | @name Getting Information 54 | */ 55 | 56 | /** 57 | Set to `YES` to support progressive display of progressive downloads 58 | */ 59 | @property (nonatomic, assign) BOOL shouldShowProgressiveDownload; 60 | 61 | /** 62 | The delegate, conforming to , to inform when the image dimensions were determined 63 | */ 64 | @property (nonatomic, assign) id delegate; 65 | 66 | 67 | /** 68 | @name Cancelling Download 69 | */ 70 | 71 | /** 72 | Cancels the image downloading 73 | */ 74 | - (void)cancelLoading; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTLinkButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTLinkButton.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 1/16/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | /** 10 | Constant for highlighting notification 11 | */ 12 | 13 | extern NSString *DTLinkButtonDidHighlightNotification; 14 | 15 | /** 16 | A button that corresponds to a hyperlink. 17 | 18 | Multiple parts of the same hyperlink synchronize their looks through the guid. 19 | */ 20 | @interface DTLinkButton : UIButton 21 | 22 | 23 | /** 24 | The URL that this button corresponds to. 25 | */ 26 | @property (nonatomic, copy) NSURL *URL; 27 | 28 | 29 | /** 30 | The unique identifier (GUID) that all parts of the same hyperlink have in common. 31 | */ 32 | @property (nonatomic, copy) NSString *GUID; 33 | 34 | 35 | /** 36 | The minimum size that the receiver should respond on hits with. Adjusts the bounds if they are smaller than the passed size. 37 | */ 38 | @property (nonatomic, assign) CGSize minimumHitSize; 39 | 40 | 41 | /** 42 | A Boolean value that determines whether tapping the button causes it to show a gray rounded rectangle. Default is YES. 43 | */ 44 | @property(nonatomic) BOOL showsTouchWhenHighlighted; 45 | 46 | /** 47 | The attributed string to be drawn for the link button. 48 | */ 49 | @property (nonatomic, retain) NSAttributedString *attributedString; 50 | 51 | 52 | /** 53 | The attributed string to be drawn for the link button while it is highlighted. 54 | */ 55 | @property (nonatomic, retain) NSAttributedString *highlightedAttributedString; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTTextBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTTextBlock.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 04.03.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTCompatibility.h" 10 | 11 | /** 12 | Class that represents a block of text with attributes like padding or a background color. 13 | */ 14 | @interface DTTextBlock : NSObject 15 | 16 | /** 17 | The space to be applied between the layouted text and the edges of the receiver 18 | */ 19 | @property (nonatomic, assign) DTEdgeInsets padding; 20 | 21 | 22 | /** 23 | The background color to paint behind the text in the receiver 24 | */ 25 | @property (nonatomic, strong) DTColor *backgroundColor; 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTTextBlock.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTTextBlock.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 04.03.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "DTTextBlock.h" 10 | #import "DTCoreText.h" 11 | 12 | @implementation DTTextBlock 13 | { 14 | DTEdgeInsets _padding; 15 | DTColor *_backgroundColor; 16 | } 17 | 18 | #pragma mark Properties 19 | 20 | @synthesize padding = _padding; 21 | @synthesize backgroundColor = _backgroundColor; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/DTWebVideoView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTWebVideoView.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 8/5/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | 10 | 11 | @class DTTextAttachment; 12 | @class DTWebVideoView; 13 | 14 | /** 15 | Protocol for delegates of 16 | */ 17 | @protocol DTWebVideoViewDelegate 18 | 19 | @optional 20 | 21 | /** 22 | Asks the delegate if an external URL may be opened 23 | @param videoView The web video view 24 | @param url The external URL that is asked to be opened 25 | @returns `YES` if the app may be left to open the external URL 26 | */ 27 | 28 | - (BOOL)videoView:(DTWebVideoView *)videoView shouldOpenExternalURL:(NSURL *)url; 29 | 30 | @end 31 | 32 | 33 | /** 34 | The class represents a custom subview for use in to represent an embedded video. 35 | */ 36 | @interface DTWebVideoView : UIView 37 | 38 | /** 39 | The delegate of the video view 40 | */ 41 | @property (nonatomic, assign) id delegate; // subtle simulator bug - use assign not __unsafe_unretained 42 | 43 | /** 44 | The text attachment representing an embedded video. 45 | */ 46 | @property (nonatomic, strong) DTTextAttachment *attachment; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSAttributedString+HTML.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedString+HTML.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 1/9/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #if TARGET_OS_IPHONE 10 | #import 11 | #elif TARGET_OS_MAC 12 | #import 13 | #endif 14 | 15 | #import "DTCoreText.h" 16 | 17 | @implementation NSAttributedString (HTML) 18 | 19 | - (id)initWithHTMLData:(NSData *)data documentAttributes:(NSDictionary **)docAttributes 20 | { 21 | return [self initWithHTMLData:data options:nil documentAttributes:docAttributes]; 22 | } 23 | 24 | - (id)initWithHTMLData:(NSData *)data baseURL:(NSURL *)base documentAttributes:(NSDictionary **)docAttributes 25 | { 26 | NSDictionary *optionsDict = nil; 27 | 28 | if (base) 29 | { 30 | optionsDict = [NSDictionary dictionaryWithObject:base forKey:NSBaseURLDocumentOption]; 31 | } 32 | 33 | return [self initWithHTMLData:data options:optionsDict documentAttributes:docAttributes]; 34 | } 35 | 36 | - (id)initWithHTMLData:(NSData *)data options:(NSDictionary *)options documentAttributes:(NSDictionary **)docAttributes 37 | { 38 | // only with valid data 39 | if (![data length]) 40 | { 41 | return nil; 42 | } 43 | 44 | DTHTMLAttributedStringBuilder *stringBuilder = [[DTHTMLAttributedStringBuilder alloc] initWithHTML:data options:options documentAttributes:docAttributes]; 45 | 46 | void (^callBackBlock)(DTHTMLElement *element) = [options objectForKey:DTWillFlushBlockCallBack]; 47 | 48 | if (callBackBlock) 49 | { 50 | [stringBuilder setWillFlushCallback:callBackBlock]; 51 | } 52 | 53 | // This needs to be on a seprate line so that ARC can handle releasing the object properly 54 | // return [stringBuilder generatedAttributedString]; shows leak in instruments 55 | id string = [stringBuilder generatedAttributedString]; 56 | 57 | return string; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSAttributedString+SmallCaps.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedString+SmallCaps.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 31.01.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | /** 10 | Methods that generated an attributed string with Small Caps, even if the used fonts don't support them natively. 11 | 12 | This category works equally for Mac and iOS attributed strings. 13 | */ 14 | 15 | @interface NSAttributedString (SmallCaps) 16 | 17 | /** 18 | Creates an `NSAttributedString` from the given text and attributes and synthesizes small caps. On iPad there is only one font that has native small caps, for all other fonts the small caps are synthesized by reduzing the font size for all lowercase characters. 19 | 20 | @param text The string to convert into an attributed string 21 | @param attributes A dictionary with attributes for the attributed string 22 | @returns An attributed string with synthesized small caps. 23 | */ 24 | + (NSAttributedString *)synthesizedSmallCapsAttributedStringWithText:(NSString *)text attributes:(NSDictionary *)attributes; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSAttributedStringRunDelegates.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedStringRunDelegates.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver on 14.01.11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #if TARGET_OS_IPHONE 10 | #import 11 | #elif TARGET_OS_MAC 12 | #import 13 | #endif 14 | 15 | void embeddedObjectDeallocCallback(void *context); 16 | CGFloat embeddedObjectGetAscentCallback(void *context); 17 | CGFloat embeddedObjectGetDescentCallback(void *context); 18 | CGFloat embeddedObjectGetWidthCallback(void *context); 19 | CTRunDelegateRef createEmbeddedObjectRunDelegate(id obj); 20 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSAttributedStringRunDelegates.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedStringRunDelegates.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver on 14.01.11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "NSAttributedStringRunDelegates.h" 10 | #import "DTTextAttachment.h" 11 | 12 | 13 | void embeddedObjectDeallocCallback(void *context) 14 | { 15 | } 16 | 17 | CGFloat embeddedObjectGetAscentCallback(void *context) 18 | { 19 | if ([(__bridge id)context isKindOfClass:[DTTextAttachment class]]) 20 | { 21 | return [(__bridge DTTextAttachment *)context ascentForLayout]; 22 | } 23 | return 0; 24 | } 25 | CGFloat embeddedObjectGetDescentCallback(void *context) 26 | { 27 | if ([(__bridge id)context isKindOfClass:[DTTextAttachment class]]) 28 | { 29 | return [(__bridge DTTextAttachment *)context descentForLayout]; 30 | } 31 | return 0; 32 | } 33 | 34 | CGFloat embeddedObjectGetWidthCallback(void * context) 35 | { 36 | if ([(__bridge id)context isKindOfClass:[DTTextAttachment class]]) 37 | { 38 | return [(__bridge DTTextAttachment *)context displaySize].width; 39 | } 40 | return 35; 41 | } 42 | 43 | CTRunDelegateRef createEmbeddedObjectRunDelegate(id obj) 44 | { 45 | CTRunDelegateCallbacks callbacks; 46 | callbacks.version = kCTRunDelegateCurrentVersion; 47 | callbacks.dealloc = embeddedObjectDeallocCallback; 48 | callbacks.getAscent = embeddedObjectGetAscentCallback; 49 | callbacks.getDescent = embeddedObjectGetDescentCallback; 50 | callbacks.getWidth = embeddedObjectGetWidthCallback; 51 | return CTRunDelegateCreate(&callbacks, (__bridge void *)obj); 52 | return NULL; 53 | } 54 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSMutableAttributedString+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+HTML.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 4/14/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | 10 | 11 | @class DTCoreTextParagraphStyle, DTCoreTextFontDescriptor; 12 | 13 | /** 14 | Methods for appending `NSString` instances to mutable attributed strings 15 | */ 16 | @interface NSMutableAttributedString (HTML) 17 | 18 | /** 19 | Appends a string with the same attributes as this string to this string. 20 | 21 | If the last character of the receiver contains a placeholder for a it is removed from the appended string. 22 | @param string The string to be appended to this string. */ 23 | - (void)appendString:(NSString *)string; 24 | 25 | /** 26 | Appends a string with a given paragraph style and font to this string. 27 | @param string The string to be appended to this string. 28 | @param paragraphStyle Paragraph style to be attributed to the appended string. 29 | @param fontDescriptor Font descriptor to be attributed to the appended string. */ 30 | - (void)appendString:(NSString *)string withParagraphStyle:(DTCoreTextParagraphStyle *)paragraphStyle fontDescriptor:(DTCoreTextFontDescriptor *)fontDescriptor; 31 | 32 | /** 33 | Appends a string without any attributes. 34 | @param string The string to be appended to this string without any attributes. 35 | */ 36 | - (void)appendNakedString:(NSString *)string; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSMutableString+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+HTML.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 01.02.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | 10 | /** 11 | Categories needed for modifying mutable strings, as needed for DTCoreText. 12 | */ 13 | @interface NSMutableString (HTML) 14 | 15 | /** 16 | Removes the trailing whitespace from the receiver. 17 | */ 18 | - (void)removeTrailingWhitespace; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSMutableString+HTML.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+HTML.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 01.02.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "NSMutableString+HTML.h" 10 | 11 | 12 | #define IS_WHITESPACE(_c) (_c == ' ' || _c == '\t' || _c == 0xA || _c == 0xB || _c == 0xC || _c == 0xD || _c == 0x85) 13 | 14 | @implementation NSMutableString (HTML) 15 | 16 | - (void)removeTrailingWhitespace 17 | { 18 | NSUInteger length = self.length; 19 | 20 | NSInteger lastIndex = length-1; 21 | NSInteger index = lastIndex; 22 | NSInteger whitespaceLength = 0; 23 | 24 | while (index>=0 && IS_WHITESPACE([self characterAtIndex:index])) 25 | { 26 | index--; 27 | whitespaceLength++; 28 | } 29 | 30 | // do the removal once for all whitespace characters 31 | if (whitespaceLength) 32 | { 33 | [self deleteCharactersInRange:NSMakeRange(index+1, whitespaceLength)]; 34 | } 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSScanner+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSScanner+HTML.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 1/12/11. 6 | // Copyright 2011 Drobnik.com. All rights reserved. 7 | // 8 | 9 | @class DTColor; 10 | 11 | /** 12 | Extensions for NSScanner to deal with HTML-specific parsing, primarily CSS-related things 13 | */ 14 | @interface NSScanner (HTML) 15 | 16 | /** 17 | @name Working with CSS 18 | */ 19 | 20 | /** 21 | Scans for a CSS attribute used in CSS style sheets 22 | @param name An optional output parameter that will contain the name of the scanned attribute if successful 23 | @param value An optional output parameter that will contain the value of the scanned attribute if successful 24 | @returns `YES` if an URL String could be scanned 25 | */ 26 | - (BOOL)scanCSSAttribute:(NSString **)name value:(NSString **)value; 27 | 28 | 29 | /** 30 | Scans for URLs used in CSS style sheets 31 | @param urlString An optional output parameter that will contain the scanned URL string if successful 32 | @returns `YES` if an URL String could be scanned 33 | */ 34 | - (BOOL)scanCSSURL:(NSString **)urlString; 35 | 36 | 37 | /** 38 | Scans for a typical HTML color, typically either #FFFFFF, rgb(255,255,255) or a HTML color name. 39 | @param color An optional output parameter that will contain the scanned color if successful 40 | @returns `YES` if a color could be scanned 41 | */ 42 | - (BOOL)scanHTMLColor:(DTColor **)color; 43 | 44 | 45 | @end 46 | 47 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSString+Paragraphs.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Paragraphs.h 3 | // DTRichTextEditor 4 | // 5 | // Created by Oliver Drobnik on 11/11/11. 6 | // Copyright (c) 2011 Cocoanetics. All rights reserved. 7 | // 8 | 9 | 10 | /** 11 | Methods simplifying dealing with text that is in paragraphs. 12 | 13 | The character used to separate paragraphs from each other is '\n'. 14 | */ 15 | @interface NSString (Paragraphs) 16 | 17 | /** 18 | Extends the given range such that it contains only full paragraphs. 19 | 20 | @param range The string range 21 | @param parBegIndex An optional output parameter that is filled with the beginning index of the extended range 22 | @param parEndIndex An optional output parameter that is filled with the ending index of the extended range 23 | @returns The extended string range 24 | */ 25 | - (NSRange)rangeOfParagraphsContainingRange:(NSRange)range parBegIndex:(NSUInteger *)parBegIndex parEndIndex:(NSUInteger *)parEndIndex; 26 | 27 | 28 | /** 29 | Determines if the given index is the first character of a new paragraph. 30 | 31 | This is done by examining the string, index 0 or characters following a newline are considered to be a first character of a new paragraph. 32 | @param index The index to examine 33 | @returns `YES` if the given index is the first character of a new paragraph, `NO` otherwise 34 | */ 35 | - (BOOL)indexIsAtBeginningOfParagraph:(NSUInteger)index; 36 | 37 | /** 38 | Returns the string range of the paragraph with the given index. 39 | 40 | @param index The paragraph index to inspect 41 | @returns The string range of the paragraph 42 | */ 43 | - (NSRange)rangeOfParagraphAtIndex:(NSUInteger)index; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/NSString+Paragraphs.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Paragraphs.m 3 | // DTRichTextEditor 4 | // 5 | // Created by Oliver Drobnik on 11/11/11. 6 | // Copyright (c) 2011 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSString+Paragraphs.h" 10 | 11 | @implementation NSString (Paragraphs) 12 | 13 | - (NSRange)rangeOfParagraphsContainingRange:(NSRange)range parBegIndex:(NSUInteger *)parBegIndex parEndIndex:(NSUInteger *)parEndIndex 14 | { 15 | // get beginning and end of paragraph containing the replaced range 16 | CFIndex beginIndex; 17 | CFIndex endIndex; 18 | 19 | CFStringGetParagraphBounds((__bridge CFStringRef)self, CFRangeMake(range.location, range.length), &beginIndex, &endIndex, NULL); 20 | 21 | if (parBegIndex) 22 | { 23 | *parBegIndex = beginIndex; 24 | } 25 | 26 | if (parEndIndex) 27 | { 28 | *parEndIndex = endIndex; 29 | } 30 | 31 | return NSMakeRange(beginIndex, endIndex - beginIndex); 32 | } 33 | 34 | - (BOOL)indexIsAtBeginningOfParagraph:(NSUInteger)index 35 | { 36 | // index zero is beginning of first paragraph 37 | if (!index) 38 | { 39 | return YES; 40 | } 41 | 42 | // beginning of any other paragraph is after NL 43 | if ([self characterAtIndex:index-1] == '\n') 44 | { 45 | return YES; 46 | } 47 | 48 | // no beginning 49 | return NO; 50 | } 51 | 52 | - (NSRange)rangeOfParagraphAtIndex:(NSUInteger)index 53 | { 54 | NSUInteger start; 55 | NSUInteger end; 56 | 57 | [self rangeOfParagraphsContainingRange:NSMakeRange(index, 1) parBegIndex:&start parEndIndex:&end]; 58 | 59 | return NSMakeRange(start, end-start); 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/UIFont+DTCoreText.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+DTCoreText.h 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 11.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | /** 10 | Methods to translate from `CTFont` to `UIFont` 11 | */ 12 | 13 | @interface UIFont (DTCoreText) 14 | 15 | /** 16 | Creates a UIFont that matches the provided CTFont. 17 | @param ctFont a `CTFontRef` 18 | @returns The matching UIFont 19 | */ 20 | + (UIFont *)fontWithCTFont:(CTFontRef)ctFont; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Core/Source/UIFont+DTCoreText.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+DTCoreText.m 3 | // DTCoreText 4 | // 5 | // Created by Oliver Drobnik on 11.12.12. 6 | // Copyright (c) 2012 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "UIFont+DTCoreText.h" 10 | 11 | @implementation UIFont (DTCoreText) 12 | 13 | + (UIFont *)fontWithCTFont:(CTFontRef)ctFont 14 | { 15 | NSString *fontName = (__bridge_transfer NSString *)CTFontCopyName(ctFont, kCTFontPostScriptNameKey); 16 | CGFloat fontSize = CTFontGetSize(ctFont); 17 | return [UIFont fontWithName:fontName size:fontSize]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/DTCoreText.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = 'DTCoreText' 3 | spec.version = '1.3.2' 4 | spec.platform = :ios, '4.3' 5 | spec.license = 'BSD' 6 | spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :tag => spec.version.to_s } 7 | spec.source_files = 'Core/Source/*.{h,m,c}' 8 | spec.dependency 'DTFoundation/Core', '~>1.1' 9 | spec.dependency 'DTFoundation/DTHMLParser', '~>1.0' 10 | spec.frameworks = 'MediaPlayer', 'QuartzCore', 'CoreText', 'CoreGraphics', 'ImageIO' 11 | spec.requires_arc = true 12 | spec.homepage = 'https://github.com/Cocoanetics/DTCoreText' 13 | spec.summary = 'Methods to allow using HTML code with CoreText.' 14 | spec.author = { 'Oliver Drobnik' => 'oliver@drobnik.com' } 15 | spec.library = 'xml2' 16 | spec.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(SDKROOT)/usr/include/libxml2"' } 17 | spec.prefix_header_contents = '#import ' 18 | spec.resources = 'Demo/Resources/DTCoreTextFontOverrides.plist' 19 | def spec.post_install(target) 20 | Dir.chdir(config.project_pods_root + 'DTCoreText/Core/Source/') do 21 | Dir.glob('*.css') do |css_file| 22 | system '/usr/bin/xxd', '-i', css_file, css_file + '.c' 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Oliver Drobnik All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 17 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTCoreText/Readme.markdown: -------------------------------------------------------------------------------- 1 | DTCoreText 2 | ========== 3 | 4 | This project aims to duplicate the methods present on Mac OSX which allow creation of `NSAttributedString` from HTML code on iOS. 5 | 6 | The project covers two broad areas: 7 | 8 | 1. **Layouting** - Interfacing with CoreText, generating attributed strings from HTML code 9 | 2. **User Interface** - UI-related classes render these objects, specifically `DTAttributedTextView`, `DTAttributedLabel` and `DTAttributedTextCell`. 10 | 11 | This is useful for drawing simple rich text like any HTML document without having to use a `UIWebView`. For text selection and highlighting (as you might need for an Editor or Reader) there is the commercial **DTRichTextEditor** component which can be purchased in the [Cocoanetics Parts Store](http://www.cocoanetics.com/parts/dtrichtexteditor/). 12 | 13 | Documentation 14 | ------------- 15 | 16 | Documentation can be [browsed online](https://docs.cocoanetics.com/DTCoreText) or installed in your Xcode Organizer via the [Atom Feed URL](https://docs.cocoanetics.com/DTCoreText/DTCoreText.atom). 17 | 18 | A [Q&A](http://www.cocoanetics.com/2011/08/nsattributedstringhtml-qa/) answers some frequently asked questions. 19 | 20 | Follow [@cocoanetics](http://twitter.com/cocoanetics) on Twitter or subscribe to the [Cocoanetics Blog](http://www.cocoanetics.com) for news and updates. 21 | 22 | #### Changelog 23 | 24 | - [Version 1.2](http://www.cocoanetics.com/2013/01/dtcoretext-1-2-0/) 25 | - [Version 1.1](http://www.cocoanetics.com/2012/12/dtcoretext-1-1/) 26 | - [Version 1.0.1](http://www.cocoanetics.com/2012/04/dtcoretext-1-0-1-linker-flags-and-rich-text-news/) 27 | - [Version 1.0](http://www.cocoanetics.com/2012/02/dtrichtexteditor-dtcoretext-news/) 28 | 29 | License 30 | ------- 31 | 32 | It is open source and covered by a standard 2-clause BSD license. That means you have to mention *Cocoanetics* as the original author of this code and reproduce the LICENSE text inside your app. 33 | 34 | You can purchase a [Non-Attribution-License](http://www.cocoanetics.com/order/?product=DTCoreText%20Non-Attribution%20License) for 75 Euros for not having to include the LICENSE text. 35 | 36 | We also accept sponsorship for specific enhancements which you might need. Please [contact us via email](mailto:oliver@cocoanetics.com?subject=DTCoreText) for inquiries. -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTBase64Coding.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTBase64Coding.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 04.03.13. 6 | // Copyright (c) 2013 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Utility class for encoding and decoding data in base64 format. 11 | 12 | This was formerly a category on `NSData` but since Matt Gallagher's category has become so enormously popular people where reporting more and more conflicts. Thus we decided to move it into a properly named class. 13 | 14 | Since all methods are class methods you never need to actually initialize it, doing so will raises a `DTAbstractClassException`. 15 | */ 16 | 17 | @interface DTBase64Coding : NSObject 18 | 19 | /** 20 | Encoding and Decoding 21 | */ 22 | 23 | /** 24 | Encodes data as base64 string. 25 | @param data The data to encode 26 | @returns The encoded string 27 | */ 28 | + (NSString *)stringByEncodingData:(NSData *)data; 29 | 30 | /** 31 | Encodes data as base64 string. 32 | @param string The string with data encoded in base64 format 33 | @returns data The decoded data 34 | */ 35 | + (NSData *)dataByDecodingString:(NSString *)string; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTExtendedFileAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTExtendedFileAttributes.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 3/6/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | This class providse read/write access to extended file attributes of a file or folder. It wraps the standard xattr Posix functions to do that. 11 | 12 | Because the file system does not keep track of the data types saved in extended attributes this API so far reads and writes strings. 13 | */ 14 | @interface DTExtendedFileAttributes : NSObject 15 | 16 | 17 | /** 18 | @name Creating an Extended File Attribute Manager 19 | */ 20 | 21 | 22 | /** 23 | Creates an Extended File Attribute Manager. 24 | 25 | @param path The file path 26 | */ 27 | - (id)initWithPath:(NSString *)path; 28 | 29 | 30 | /** 31 | @name Reading/Writing Extended Attributes 32 | */ 33 | 34 | /** 35 | Removes an extended file attribute from the receiver. 36 | 37 | @param attribute The name of the attribute. 38 | @returns `YES` if successful. 39 | */ 40 | - (BOOL)removeAttribute:(NSString *)attribute; 41 | 42 | 43 | /** 44 | Sets the value of an extended file attribute for the receiver. 45 | 46 | If the value is `nil` then this is the same as calling . 47 | 48 | @param value The string to save for this attribute. 49 | @param attribute The name of the attribute. 50 | @returns `YES` if successful. 51 | */ 52 | - (BOOL)setValue:(NSString *)value forAttribute:(NSString *)attribute; 53 | 54 | 55 | /** 56 | Gets the value of an extended file attribute from the receiver. 57 | 58 | @param attribute The name of the attribute. 59 | @returns The string for the value or `nil` if the value is not set. 60 | */ 61 | - (NSString *)valueForAttribute:(NSString *)attribute; 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTFoundationConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTFoundationConstants.h 3 | // DTFoundation 4 | // 5 | // Created by Stefan Gugarel on 10/18/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | 10 | // string constant for NSError domain 11 | extern NSString * const DTFoundationErrorDomain; -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTFoundationConstants.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTFoundationConstants.m 3 | // DTFoundation 4 | // 5 | // Created by Stefan Gugarel on 10/18/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "DTFoundationConstants.h" 10 | 11 | NSString * const DTFoundationErrorDomain = @"DTFoundation"; -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTObjectBlockExecutor.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTObjectBlockExecutor.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 12.02.13. 6 | // Copyright (c) 2013 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | This class is used by [NSObject addDeallocBlock:] to execute blocks on dealloc 11 | */ 12 | 13 | @interface DTObjectBlockExecutor : NSObject 14 | 15 | /** 16 | Convenience method to create a block executor with a deallocation block 17 | @param block The block to execute when the created receiver is being deallocated 18 | */ 19 | + (id)blockExecutorWithDeallocBlock:(void(^)())block; 20 | 21 | /** 22 | Block to execute when dealloc of the receiver is called 23 | */ 24 | @property (nonatomic, copy) void (^deallocBlock)(); 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTObjectBlockExecutor.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTObjectBlockExecutor.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 12.02.13. 6 | // Copyright (c) 2013 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "DTObjectBlockExecutor.h" 10 | 11 | 12 | @implementation DTObjectBlockExecutor 13 | 14 | + (id)blockExecutorWithDeallocBlock:(void(^)())block 15 | { 16 | DTObjectBlockExecutor *executor = [[DTObjectBlockExecutor alloc] init]; 17 | executor.deallocBlock = block; // copy 18 | return executor; 19 | } 20 | 21 | - (void)dealloc 22 | { 23 | if (_deallocBlock) 24 | { 25 | _deallocBlock(); 26 | _deallocBlock = nil; 27 | } 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTScriptExpression.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTScriptExpression.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 10/17/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "DTScriptVariable.h" 10 | 11 | typedef void (^DTScriptExpressionParameterEnumerationBlock) (NSString *paramName, DTScriptVariable *variable, BOOL *stop); 12 | 13 | /** 14 | Instances of this class represent a single Objective-C script expression 15 | */ 16 | 17 | @interface DTScriptExpression : NSObject 18 | 19 | 20 | /** 21 | Creates a script expression from an `NSString` 22 | @param string A string representing an Object-C command including square brackets. 23 | */ 24 | + (DTScriptExpression *)scriptExpressionWithString:(NSString *)string; 25 | 26 | /** 27 | Creates a script expression from an `NSString` 28 | @param string A string representing an Object-C command including square brackets. 29 | */ 30 | - (id)initWithString:(NSString *)string; 31 | 32 | /** 33 | The parameters of the script expression 34 | */ 35 | @property (nonatomic, readonly) NSArray *parameters; 36 | 37 | /** 38 | Enumerates the script parameters and executes the block for each parameter. 39 | @param block The block to be executed for each parameter 40 | */ 41 | - (void)enumerateParametersWithBlock:(DTScriptExpressionParameterEnumerationBlock)block; 42 | 43 | /** 44 | Accesses the receiver of the expression 45 | */ 46 | @property (nonatomic, readonly) DTScriptVariable *receiver; 47 | 48 | /** 49 | The method selector 50 | */ 51 | - (SEL)selector; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTScriptVariable.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTScriptValue.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 10/18/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Class to represent a variable or parameter in a Objective-C scripting expression 11 | */ 12 | @interface DTScriptVariable : NSObject 13 | 14 | /** 15 | Creates a new script variable with a given name and value 16 | @param name The name for the variable 17 | @param value The value for the variable 18 | */ 19 | + (id)scriptVariableWithName:(NSString *)name value:(id)value; 20 | 21 | /** 22 | The name of the receiver 23 | */ 24 | @property (nonatomic, copy) NSString *name; 25 | 26 | 27 | /** 28 | The current value of the receiver 29 | */ 30 | @property (nonatomic, strong) id value; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTScriptVariable.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTScriptValue.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 10/18/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "DTScriptVariable.h" 10 | 11 | @implementation DTScriptVariable 12 | { 13 | NSString *_name; 14 | id _value; 15 | } 16 | 17 | - (id)initWithName:(NSString *)name value:(id)value 18 | { 19 | self = [super init]; 20 | 21 | if (self) 22 | { 23 | _name = name; 24 | _value = value; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | 31 | + (id)scriptVariableWithName:(NSString *)name value:(id)value 32 | { 33 | return [[DTScriptVariable alloc] initWithName:name value:value]; 34 | } 35 | 36 | - (NSString *)description 37 | { 38 | return [NSString stringWithFormat:@"<%@ name='%@' value=='%@'>", NSStringFromClass([self class]), _name, _value]; 39 | } 40 | 41 | #pragma mark - Properties 42 | 43 | @synthesize name = _name; 44 | @synthesize value = _value; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/DTUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTUtils.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 7/18/10. 6 | // Copyright 2010 Drobnik.com. All rights reserved. 7 | // 8 | 9 | /** 10 | Various CoreGraphics-related utility functions 11 | */ 12 | 13 | CGSize sizeThatFitsKeepingAspectRatio(CGSize originalSize, CGSize sizeToFit); 14 | 15 | CGSize sizeThatFillsKeepingAspectRatio(CGSize originalSize, CGSize sizeToFit); 16 | 17 | /** 18 | Replacement for buggy CGSizeMakeWithDictionaryRepresentation 19 | @param dict The dictionary containing an encoded `CGSize` 20 | @param size The `CGSize` to decode from the dictionary 21 | @see http://www.cocoanetics.com/2012/09/radar-cgrectmakewithdictionaryrepresentation/ 22 | */ 23 | BOOL DTCGSizeMakeWithDictionaryRepresentation(NSDictionary *dict, CGSize *size); 24 | 25 | /** 26 | Replacement for buggy CGSizeCreateDictionaryRepresentation 27 | @param size The `CGSize` to encode in the returned dictionary 28 | @see http://www.cocoanetics.com/2012/09/radar-cgrectmakewithdictionaryrepresentation/ 29 | */ 30 | NSDictionary *DTCGSizeCreateDictionaryRepresentation(CGSize size); 31 | 32 | /** 33 | Replacement for buggy CGRectMakeWithDictionaryRepresentation 34 | @param dict The dictionary containing an encoded `CGRect` 35 | @param rect The `CGRect` to decode from the dictionary 36 | @see http://www.cocoanetics.com/2012/09/radar-cgrectmakewithdictionaryrepresentation/ 37 | */ 38 | BOOL DTCGRectMakeWithDictionaryRepresentation(NSDictionary *dict, CGRect *rect); 39 | 40 | /** 41 | Replacement for buggy CGRectCreateDictionaryRepresentation 42 | @param rect The `CGRect` to encode in the returned dictionary 43 | @see http://www.cocoanetics.com/2012/09/radar-cgrectmakewithdictionaryrepresentation/ 44 | */ 45 | NSDictionary *DTCGRectCreateDictionaryRepresentation(CGRect rect); 46 | 47 | /** 48 | Convenience method to find the center of a CGRect. Uses CGRectGetMidX and CGRectGetMidY. 49 | @returns The point which is the center of rect. 50 | */ 51 | CGPoint CGRectCenter(CGRect rect); 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSArray+DTError.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+DTError.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 6/15/10. 6 | // Copyright 2010 Drobnik.com. All rights reserved. 7 | // 8 | 9 | #import "NSArray+DTError.h" 10 | #import "DTFoundationConstants.h" 11 | 12 | @implementation NSArray (DTError) 13 | 14 | + (NSArray *)arrayWithContentsOfURL:(NSURL *)URL error:(NSError **)error 15 | { 16 | NSData *readData = [NSData dataWithContentsOfURL:URL options:0 error:error]; 17 | 18 | if (!readData) 19 | { 20 | return nil; 21 | } 22 | 23 | return [NSArray arrayWithContentsOfData:readData error:error]; 24 | } 25 | 26 | + (NSArray *)arrayWithContentsOfFile:(NSString *)path error:(NSError **)error 27 | { 28 | NSURL *url = [NSURL fileURLWithPath:path]; 29 | return [NSArray arrayWithContentsOfURL:url error:error]; 30 | } 31 | 32 | + (NSArray *)arrayWithContentsOfData:(NSData *)data error:(NSError **)error 33 | { 34 | CFErrorRef parseError = NULL; 35 | NSArray *array = (__bridge_transfer NSArray *)CFPropertyListCreateWithData(kCFAllocatorDefault, (__bridge CFDataRef)data, kCFPropertyListImmutable, NULL, (CFErrorRef *)&parseError); 36 | 37 | if ([array isKindOfClass:[NSArray class]]) 38 | { 39 | return array; 40 | } 41 | 42 | if (parseError) 43 | { 44 | if (error) 45 | { 46 | *error = (__bridge NSError *)(parseError); 47 | } 48 | 49 | CFRelease(parseError); 50 | } 51 | 52 | return nil; 53 | } 54 | 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSData+DTCrypto.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+DTCrypto.h 3 | // DTFoundation 4 | // 5 | // Created by Stefan Gugarel on 10/3/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Useful cryptography methods 11 | */ 12 | 13 | @interface NSData (DTCrypto) 14 | 15 | /**------------------------------------------------------------------------------------- 16 | @name Generating HMAC Hashes 17 | --------------------------------------------------------------------------------------- 18 | */ 19 | 20 | /** 21 | Generates a HMAC from the receiver using the SHA1 algorithm 22 | @param key The encryption key 23 | @returns The encrypted hash 24 | */ 25 | - (NSData *)encryptedDataUsingSHA1WithKey:(NSData *)key; 26 | 27 | 28 | /**------------------------------------------------------------------------------------- 29 | @name Digest Hashes 30 | --------------------------------------------------------------------------------------- 31 | */ 32 | 33 | /** 34 | Generate an md5 checksum from the receiver 35 | @returns An `NSData` containing the md5 digest. 36 | */ 37 | -(NSData *)dataWithMD5Hash; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSData+DTCrypto.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+DTCrypto.m 3 | // DTFoundation 4 | // 5 | // Created by Stefan Gugarel on 10/3/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSData+DTCrypto.h" 10 | #include 11 | #import 12 | 13 | /** 14 | Common cryptography methods 15 | */ 16 | @implementation NSData (DTCrypto) 17 | 18 | 19 | - (NSData *)encryptedDataUsingSHA1WithKey:(NSData *)key 20 | { 21 | unsigned char cHMAC[CC_SHA1_DIGEST_LENGTH]; 22 | 23 | CCHmac(kCCHmacAlgSHA1, [key bytes], [key length], [self bytes], [self length], cHMAC); 24 | 25 | return [NSData dataWithBytes:&cHMAC length:CC_SHA1_DIGEST_LENGTH]; 26 | } 27 | 28 | - (NSData *)dataWithMD5Hash 29 | { 30 | const char *cStr = [self bytes]; 31 | unsigned char digest[CC_MD5_DIGEST_LENGTH]; 32 | CC_MD5( cStr, (CC_LONG)[self length], digest ); 33 | 34 | return [NSData dataWithBytes:digest length:CC_MD5_DIGEST_LENGTH]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSDictionary+DTError.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+DTError.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 4/16/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+DTError.h" 10 | #import "DTFoundationConstants.h" 11 | 12 | @implementation NSDictionary (DTError) 13 | 14 | + (NSDictionary *)dictionaryWithContentsOfURL:(NSURL *)URL error:(NSError **)error 15 | { 16 | NSData *readData = [NSData dataWithContentsOfURL:URL options:0 error:error]; 17 | 18 | if (!readData) 19 | { 20 | return nil; 21 | } 22 | 23 | return [NSDictionary dictionaryWithContentsOfData:readData error:error]; 24 | } 25 | 26 | + (NSDictionary *)dictionaryWithContentsOfFile:(NSString *)path error:(NSError **)error 27 | { 28 | NSURL *url = [NSURL fileURLWithPath:path]; 29 | return [NSDictionary dictionaryWithContentsOfURL:url error:error]; 30 | } 31 | 32 | + (NSDictionary *)dictionaryWithContentsOfData:(NSData *)data error:(NSError **)error 33 | { 34 | CFErrorRef parseError = NULL; 35 | NSDictionary *dictionary = (__bridge_transfer NSDictionary *)CFPropertyListCreateWithData(kCFAllocatorDefault, (__bridge CFDataRef)data, kCFPropertyListImmutable, NULL, (CFErrorRef *)&parseError); 36 | 37 | // we check if it is the correct type and only return it if it is 38 | if ([dictionary isKindOfClass:[NSDictionary class]]) 39 | { 40 | return dictionary; 41 | } 42 | else 43 | { 44 | if (parseError) 45 | { 46 | if (error) 47 | { 48 | *error = (__bridge NSError *)parseError; 49 | } 50 | 51 | CFRelease(parseError); 52 | } 53 | 54 | return nil; 55 | } 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSFileWrapper+DTCopying.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileWrapper+DTCopying.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 10/19/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Methods for copying file wrappers 11 | */ 12 | @interface NSFileWrapper (DTCopying) 13 | 14 | /** 15 | Creates a copy of the receiver by deep copying all contained sub filewrappers. 16 | */ 17 | - (NSFileWrapper *)fileWrapperByDeepCopying; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSFileWrapper+DTCopying.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileWrapper+DTCopying.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 10/19/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSFileWrapper+DTCopying.h" 10 | 11 | @implementation NSFileWrapper (DTCopying) 12 | 13 | - (NSFileWrapper *)fileWrapperByDeepCopying 14 | { 15 | if ([self isDirectory]) 16 | { 17 | NSMutableDictionary *subFileWrappers = [NSMutableDictionary dictionary]; 18 | 19 | [self.fileWrappers enumerateKeysAndObjectsUsingBlock:^(NSString *fileName, NSFileWrapper *fileWrapper, BOOL *stop) { 20 | NSFileWrapper *copyWrapper = [fileWrapper fileWrapperByDeepCopying]; 21 | [subFileWrappers setObject:copyWrapper forKey:fileName]; 22 | }]; 23 | 24 | NSFileWrapper *fileWrapper = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:subFileWrappers]; 25 | 26 | return fileWrapper; 27 | } 28 | 29 | NSFileWrapper *fileWrapper = [[NSFileWrapper alloc] initRegularFileWithContents:self.regularFileContents]; 30 | return fileWrapper; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSMutableArray+DTMoving.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+DTMoving.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 9/27/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Methods that add convient moving methods to `NSMutableArray` 11 | */ 12 | 13 | @interface NSMutableArray (DTMoving) 14 | 15 | /** 16 | Moves the object at the specified indexes to the new location. 17 | 18 | @param indexes The indexes of the objects to move. 19 | @param idx The index in the mutable array at which to insert the objects. 20 | */ 21 | - (void)moveObjectsAtIndexes:(NSIndexSet *)indexes toIndex:(NSUInteger)idx; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSMutableArray+DTMoving.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+DTMoving.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 9/27/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSMutableArray+DTMoving.h" 10 | 11 | @implementation NSMutableArray (DTMoving) 12 | 13 | // credit: http://www.cocoabuilder.com/archive/cocoa/189484-nsarray-move-items-at-indexes.html 14 | 15 | - (void)moveObjectsAtIndexes:(NSIndexSet *)indexes toIndex:(NSUInteger)idx 16 | { 17 | NSArray *objectsToMove = [self objectsAtIndexes:indexes]; 18 | 19 | // If any of the removed objects come before the index, we want to decrement the index appropriately 20 | idx -= [indexes countOfIndexesInRange:(NSRange){0, idx}]; 21 | 22 | [self removeObjectsAtIndexes:indexes]; 23 | [self replaceObjectsInRange:(NSRange){idx,0} withObjectsFromArray:objectsToMove]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSObject+DTRuntime.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+DTRuntime.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 4/25/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Methods to dynamically modify objects at runtime 11 | */ 12 | 13 | @interface NSObject (DTRuntime) 14 | 15 | /**------------------------------------------------------------------------------------- 16 | @name Blocks 17 | --------------------------------------------------------------------------------------- 18 | */ 19 | 20 | /** 21 | Adds a block to be executed as soon as the receiver's memory is deallocated 22 | @param block The block to execute when the receiver is being deallocated 23 | */ 24 | - (void)addDeallocBlock:(void(^)())block; 25 | 26 | /**------------------------------------------------------------------------------------- 27 | @name Method Swizzling 28 | --------------------------------------------------------------------------------------- 29 | */ 30 | 31 | /** 32 | Exchanges two method implementations. After the call methods to the first selector will now go to the second one and vice versa. 33 | @param selector The first method 34 | @param otherSelector The second method 35 | */ 36 | + (void)swizzleMethod:(SEL)selector withMethod:(SEL)otherSelector; 37 | 38 | 39 | /** 40 | Exchanges two class method implementations. After the call methods to the first selector will now go to the second one and vice versa. 41 | @param selector The first method 42 | @param otherSelector The second method 43 | */ 44 | + (void)swizzleClassMethod:(SEL)selector withMethod:(SEL)otherSelector; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSScanner+DTScripting.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSScanner+DTScripting.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 10/18/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | @class DTScriptVariable; 10 | 11 | /** 12 | Category for `NSScanner` to deal with Objective-C script 13 | */ 14 | @interface NSScanner (DTScripting) 15 | 16 | /** 17 | Attempts to scan at the current scan location for a script expression. 18 | 19 | Script Expressions can be, an NSString, nil, a number, a boolean, or a variable name 20 | @param variable Output parameter to receive a scanned script variable 21 | @returns `YES` if successful 22 | */ 23 | - (BOOL)scanScriptVariable:(DTScriptVariable **)variable; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSString+DTFormatNumbers.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+DTFormatNumbers.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 11/25/11. 6 | // Copyright (c) 2011 Cocoanetics. All rights reserved. 7 | // 8 | 9 | 10 | /** A collection of category extensions for `NSString` dealing with the formatting of numbers in special contexts. */ 11 | 12 | @interface NSString (DTFormatNumbers) 13 | 14 | /**------------------------------------------------------------------------------------- 15 | @name Formatting File Sizes 16 | --------------------------------------------------------------------------------------- 17 | */ 18 | 19 | 20 | /** Formats the passed number as a byte value in a form that is pleasing to the user when displayed next to a progress bar. 21 | 22 | Output numbers are rounded to one decimal place. Bytes are not abbreviated because most users might not be used to B for that. Higher units are kB, MB, GB and TB. 23 | 24 | @param bytes The value of the bytes to be formatted 25 | @return Returns the formatted string. 26 | 27 | */ 28 | + (NSString *)stringByFormattingBytes:(long long)bytes; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSString+DTFormatNumbers.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+DTFormatNumbers.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 11/25/11. 6 | // Copyright (c) 2011 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSString+DTFormatNumbers.h" 10 | 11 | @implementation NSString (DTFormatNumbers) 12 | 13 | + (NSString *)stringByFormattingBytes:(long long)bytes 14 | { 15 | NSArray *units = [NSArray arrayWithObjects:@"%1.0f Bytes", @"%1.1f KB", @"%1.1f MB", @"%1.1f GB", @"%1.1f TB", nil]; 16 | 17 | long long value = bytes * 10; 18 | for (int i=0; i<[units count]; i++) 19 | { 20 | if (i > 0) 21 | { 22 | value = value/1024; 23 | } 24 | if (value < 10000) 25 | { 26 | return [NSString stringWithFormat:[units objectAtIndex:i], value/10.0]; 27 | } 28 | } 29 | 30 | return [NSString stringWithFormat:[units objectAtIndex:[units count]-1], value/10.0]; 31 | } 32 | @end 33 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSString+DTURLEncoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+DTURLEncoding.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 4/16/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | A collection of useful additions for `NSString` to deal with URL encoding. 11 | */ 12 | 13 | @interface NSString (DTURLEncoding) 14 | 15 | /**------------------------------------------------------------------------------------- 16 | @name Encoding Strings for URLs 17 | --------------------------------------------------------------------------------------- 18 | */ 19 | 20 | 21 | /** Encoding suitable for use in URLs. 22 | 23 | stringByAddingPercentEscapes does not replace serveral characters which are problematics in URLs. 24 | 25 | @return The encoded version of the receiver. 26 | */ 27 | - (NSString *)stringByURLEncoding; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSString+DTURLEncoding.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+DTURLEncoding.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 4/16/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSString+DTURLEncoding.h" 10 | 11 | @implementation NSString (DTURLEncoding) 12 | 13 | - (NSString *)stringByURLEncoding 14 | { 15 | return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (__bridge CFStringRef)self, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8); 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSString+DTUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+DTUtilities.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 4/16/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | 10 | /** 11 | A collection of useful additions for `NSString` to deal with paths. 12 | */ 13 | 14 | @interface NSString (DTUtilities) 15 | 16 | /**------------------------------------------------------------------------------------- 17 | @name Working with Identifiers 18 | --------------------------------------------------------------------------------------- 19 | */ 20 | 21 | /** Creates a new string that contains a generated UUID. 22 | 23 | @return The path to the app's Caches folder. 24 | */ 25 | + (NSString *)stringWithUUID; 26 | 27 | 28 | /**------------------------------------------------------------------------------------- 29 | @name Working with Checksums 30 | --------------------------------------------------------------------------------------- 31 | */ 32 | 33 | /** creates an MD5 checksum 34 | 35 | @return returns an MD5 hash for the receiver. 36 | */ 37 | - (NSString *)md5Checksum; 38 | 39 | 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSString+DTUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+DTUtilities.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 4/16/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSString+DTUtilities.h" 10 | 11 | #import 12 | 13 | @implementation NSString (DTUtilities) 14 | 15 | + (NSString *)stringWithUUID 16 | { 17 | CFUUIDRef uuidObj = CFUUIDCreate(nil);//create a new UUID 18 | 19 | //get the string representation of the UUID 20 | NSString *uuidString = (__bridge_transfer NSString *)CFUUIDCreateString(nil, uuidObj); 21 | 22 | CFRelease(uuidObj); 23 | return uuidString; 24 | } 25 | 26 | - (NSString *)md5Checksum 27 | { 28 | const char *cStr = [self UTF8String]; 29 | unsigned char result [CC_MD5_DIGEST_LENGTH]; 30 | CC_MD5( cStr, (CC_LONG)strlen(cStr), result ); 31 | 32 | return [NSString stringWithFormat: @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", 33 | result[0], result[1], 34 | result[2], result[3], 35 | result[4], result[5], 36 | result[6], result[7], 37 | result[8], result[9], 38 | result[10], result[11], 39 | result[12], result[13], 40 | result[14], result[15] 41 | ]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSURL+DTComparing.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+DTComparing.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 13.11.12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** 10 | Category for comparing URLs. 11 | 12 | Contrary to what you might think isEqual: does not work properly in many cases. 13 | */ 14 | 15 | @interface NSURL (DTComparing) 16 | 17 | /** 18 | Compares the receiver with another URL 19 | @param URL another URL 20 | @returns `YES` if the receiver is equivalent with the passed URL 21 | */ 22 | - (BOOL)isEqualToURL:(NSURL *)URL; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSURL+DTComparing.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+DTComparing.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 13.11.12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSURL+DTComparing.h" 10 | 11 | @implementation NSURL (DTComparing) 12 | 13 | - (BOOL)isEqualToURL:(NSURL *)URL 14 | { 15 | // scheme must be same 16 | if (![[self scheme] isEqualToString:[URL scheme]]) 17 | { 18 | return NO; 19 | } 20 | 21 | // host must be same 22 | if (![[self host] isEqualToString:[URL host]]) 23 | { 24 | return NO; 25 | } 26 | 27 | // path must be same 28 | if (![[self path] isEqualToString:[URL path]]) 29 | { 30 | return NO; 31 | } 32 | 33 | return YES; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSURL+DTUnshorten.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+DTUnshorten.h 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 6/2/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | /** Method for getting the full length URL for a shortened one. 10 | 11 | For example: 12 | 13 | NSURL *url = [NSURL URLWithString:@"buff.ly/L4uGoza"]; 14 | 15 | [url unshortenWithCompletion:^(NSURL *url) { 16 | NSLog(@"Unshortened: %@", url); 17 | }]; 18 | 19 | */ 20 | 21 | typedef void (^NSURLUnshortenCompletionHandler)(NSURL *); 22 | 23 | @interface NSURL (DTUnshorten) 24 | 25 | /** 26 | Unshortens the receiver and returns the long URL via the completion handler. 27 | 28 | Results are cached and therefore a subsequent call for the same receiver will return instantly if the result is still present in the cache. 29 | @param completion The completion handler 30 | */ 31 | - (void)unshortenWithCompletion:(NSURLUnshortenCompletionHandler)completion; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/Core/Source/NSURL+DTUnshorten.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+DTUnshorten.m 3 | // DTFoundation 4 | // 5 | // Created by Oliver Drobnik on 6/2/12. 6 | // Copyright (c) 2012 Cocoanetics. All rights reserved. 7 | // 8 | 9 | #import "NSURL+DTUnshorten.h" 10 | 11 | @implementation NSURL (DTUnshorten) 12 | 13 | - (void)unshortenWithCompletion:(NSURLUnshortenCompletionHandler)completion 14 | { 15 | static NSCache *unshortenCache = nil; 16 | static dispatch_queue_t shortenQueue = NULL; 17 | 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | unshortenCache = [[NSCache alloc] init]; 21 | shortenQueue = dispatch_queue_create("DTUnshortenQueue", 0); 22 | }); 23 | 24 | NSURL *shortURL = self; 25 | 26 | // assume HTTP if scheme is missing 27 | if (![self scheme]) 28 | { 29 | NSString *str = [@"http://" stringByAppendingString:[self absoluteString]]; 30 | shortURL = [NSURL URLWithString:str]; 31 | } 32 | 33 | dispatch_async(shortenQueue, ^{ 34 | // look into cache first 35 | NSURL *longURL = [unshortenCache objectForKey:shortURL]; 36 | 37 | // nothing cached, load it 38 | if (!longURL) 39 | { 40 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:shortURL]; 41 | request.HTTPMethod = @"HEAD"; 42 | 43 | NSError *error = nil; 44 | NSHTTPURLResponse *response = nil; 45 | 46 | [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; 47 | 48 | longURL = [response URL]; 49 | 50 | // cache result 51 | if (longURL) 52 | { 53 | [unshortenCache setObject:longURL forKey:shortURL]; 54 | } 55 | } 56 | 57 | if (completion) 58 | { 59 | completion(longURL); 60 | } 61 | }); 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/DTFoundation.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = 'DTFoundation' 3 | spec.version = '1.1.0' 4 | spec.summary = "Standard toolset classes and categories." 5 | spec.homepage = "https://github.com/Cocoanetics/DTFoundation" 6 | spec.author = { "Oliver Drobnik" => "oliver@drobnik.com" } 7 | spec.source = { :git => "https://github.com/Cocoanetics/DTFoundation.git", :tag => spec.version.to_s } 8 | spec.license = 'BSD' 9 | spec.requires_arc = true 10 | 11 | spec.subspec 'Core' do |ss| 12 | ss.ios.deployment_target = '4.3' 13 | ss.osx.deployment_target = '10.6' 14 | ss.source_files = 'Core/Source/*.{h,m}' 15 | end 16 | 17 | spec.subspec 'UIKit' do |ss| 18 | ss.platform = :ios, '4.3' 19 | ss.dependency 'DTFoundation/Core' 20 | ss.ios.frameworks = 'QuartzCore' 21 | ss.ios.source_files = 'Core/Source/iOS/*.{h,m}' 22 | end 23 | 24 | spec.subspec 'AppKit' do |ss| 25 | ss.platform = :osx, '10.6' 26 | ss.dependency 'DTFoundation/Core' 27 | ss.osx.source_files = 'Core/Source/OSX/*.{h,m}' 28 | end 29 | 30 | spec.subspec 'DTHMLParser' do |ss| 31 | ss.ios.deployment_target = '4.3' 32 | ss.dependency 'DTFoundation/Core' 33 | ss.source_files = 'Core/Source/DTHTMLParser/*.{h,m}' 34 | ss.library = 'xml2' 35 | ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' } 36 | end 37 | 38 | spec.subspec 'DTZipArchive' do |ss| 39 | ss.ios.deployment_target = '4.3' 40 | ss.source_files = 'Core/Source/DTZipArchive/*.{h,m}' 41 | 42 | # Ideally minizip should have a Pod 43 | # ss.dependency 'Minizip' 44 | ss.subspec 'Minizip' do |sss| 45 | sss.source_files = 'Core/Source/Externals/minizip/*.{h,c}' 46 | end 47 | end 48 | 49 | spec.subspec 'DTUTI' do |ss| 50 | ss.ios.deployment_target = '4.3' 51 | ss.ios.frameworks = ['MobileCoreServices'] 52 | ss.source_files = 'Core/Source/DTUTI/*.{h,m}' 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/DTFoundation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Oliver Drobnik All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 17 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTAttributedLabel.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedLabel.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTAttributedTextCell.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedTextCell.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTAttributedTextContentView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedTextContentView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTAttributedTextView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTAttributedTextView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCSSListStyle.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCSSListStyle.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCSSStylesheet.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCSSStylesheet.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTColor+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTColor+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCompatibility.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCompatibility.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextConstants.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextConstants.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextFontCollection.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextFontCollection.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextFontDescriptor.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextFontDescriptor.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextFunctions.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextFunctions.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextGlyphRun.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextGlyphRun.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextLayoutFrame.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextLayoutFrame.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextLayoutLine.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextLayoutLine.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextLayouter.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextLayouter.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTCoreTextParagraphStyle.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTCoreTextParagraphStyle.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTDictationPlaceholderTextAttachment.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTDictationPlaceholderTextAttachment.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTDictationPlaceholderView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTDictationPlaceholderView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLAttributedStringBuilder.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLAttributedStringBuilder.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElement.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElement.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElementAttachment.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementAttachment.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElementBR.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementBR.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElementHR.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementHR.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElementLI.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementLI.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElementStylesheet.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementStylesheet.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLElementText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLElementText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLParserNode.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLParserNode.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLParserTextNode.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLParserTextNode.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTHTMLWriter.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTHTMLWriter.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTImage+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTImage+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTLazyImageView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTLazyImageView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTLinkButton.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTLinkButton.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTTextAttachment.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTTextAttachment.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTTextBlock.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTTextBlock.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/DTWebVideoView.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/DTWebVideoView.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSAttributedString+DTCoreText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedString+DTCoreText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSAttributedString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSAttributedString+SmallCaps.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedString+SmallCaps.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSAttributedStringRunDelegates.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSAttributedStringRunDelegates.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSCharacterSet+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSCharacterSet+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSMutableAttributedString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSMutableAttributedString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSMutableString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSMutableString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSScanner+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSScanner+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSString+CSS.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSString+CSS.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSString+HTML.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/NSString+Paragraphs.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/NSString+Paragraphs.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTCoreText/UIFont+DTCoreText.h: -------------------------------------------------------------------------------- 1 | ../../DTCoreText/Core/Source/UIFont+DTCoreText.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTASN1Parser.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTASN1Parser.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTBase64Coding.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTBase64Coding.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTExtendedFileAttributes.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTExtendedFileAttributes.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTFoundationConstants.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTFoundationConstants.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTHTMLParser.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTHTMLParser/DTHTMLParser.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTObjectBlockExecutor.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTObjectBlockExecutor.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTScriptExpression.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTScriptExpression.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTScriptVariable.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTScriptVariable.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTUtils.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTUtils.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/DTVersion.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/DTVersion.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSArray+DTError.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSArray+DTError.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSData+DTCrypto.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSData+DTCrypto.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSDictionary+DTError.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSDictionary+DTError.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSFileWrapper+DTCopying.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSFileWrapper+DTCopying.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSMutableArray+DTMoving.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSMutableArray+DTMoving.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSObject+DTRuntime.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSObject+DTRuntime.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSScanner+DTScripting.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSScanner+DTScripting.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSString+DTFormatNumbers.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTFormatNumbers.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSString+DTPaths.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTPaths.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSString+DTURLEncoding.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTURLEncoding.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSString+DTUtilities.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSString+DTUtilities.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSURL+DTComparing.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSURL+DTComparing.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Headers/DTFoundation/NSURL+DTUnshorten.h: -------------------------------------------------------------------------------- 1 | ../../DTFoundation/Core/Source/NSURL+DTUnshorten.h -------------------------------------------------------------------------------- /BeBoldDT/Pods/Pods-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import 6 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | install_resource() 4 | { 5 | case $1 in 6 | *.storyboard) 7 | echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 8 | ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 9 | ;; 10 | *.xib) 11 | echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 12 | ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 13 | ;; 14 | *.framework) 15 | echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 16 | rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 17 | ;; 18 | *.xcdatamodeld) 19 | echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" 20 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" 21 | ;; 22 | *) 23 | echo "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 24 | cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 25 | ;; 26 | esac 27 | } 28 | install_resource 'DTCoreText/Demo/Resources/DTCoreTextFontOverrides.plist' 29 | -------------------------------------------------------------------------------- /BeBoldDT/Pods/Pods.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = YES 2 | HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS} "$(SDKROOT)/usr/include/libxml2" $(SDKROOT)/usr/include/libxml2 3 | OTHER_LDFLAGS = -ObjC -lxml2 -framework CoreGraphics -framework CoreText -framework ImageIO -framework MediaPlayer -framework QuartzCore 4 | PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/DTCoreText" "${PODS_ROOT}/BuildHeaders/DTFoundation" 5 | PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS} 6 | PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/DTCoreText" "${PODS_ROOT}/Headers/DTFoundation" 7 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /BeBoldDT/Pods/PodsDummy_Pods.m: -------------------------------------------------------------------------------- 1 | @interface PodsDummy_Pods : NSObject 2 | @end 3 | @implementation PodsDummy_Pods 4 | @end 5 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/BeBoldMT-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.robnapier.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/BeBoldMT-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BeBold' target in the 'BeBold' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBoldMT/BeBold/Default-568h@2x.png -------------------------------------------------------------------------------- /BeBoldMT/BeBold/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBoldMT/BeBold/Default.png -------------------------------------------------------------------------------- /BeBoldMT/BeBold/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/BeBoldMT/BeBold/Default@2x.png -------------------------------------------------------------------------------- /BeBoldMT/BeBold/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | @property (weak, nonatomic) IBOutlet UILabel *label; 13 | @property (weak, nonatomic) IBOutlet UITextView *textView; 14 | - (IBAction)applyBold:(id)sender; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BeBoldMT/BeBold/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BeBold 4 | // 5 | // Created by Rob Napier on 11/7/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BeBoldMT/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '6.1' 2 | pod "MTStringAttributes", :git => 'https://github.com/rnapier/MTStringAttributes.git' 3 | -------------------------------------------------------------------------------- /BeBoldMT/Podfile.lock: -------------------------------------------------------------------------------- 1 | 2 | PODS: 3 | - MTStringAttributes (0.0.2): 4 | - Slash (~> 0.1) 5 | - Slash (0.1): 6 | - Slash/arc (= 0.1) 7 | - Slash/no-arc (= 0.1) 8 | - Slash/arc (0.1) 9 | - Slash/no-arc (0.1) 10 | 11 | DEPENDENCIES: 12 | - MTStringAttributes (from `https://github.com/rnapier/MTStringAttributes.git') 13 | 14 | EXTERNAL SOURCES: 15 | MTStringAttributes: 16 | :git: https://github.com/rnapier/MTStringAttributes.git 17 | 18 | SPEC CHECKSUMS: 19 | MTStringAttributes: 2772a4243953a1c72f108ecc2dc5e60b0192b9ac 20 | Slash: d594faa2126764cad15ceb01b251e2e6577743d9 21 | Slash/arc: d594faa2126764cad15ceb01b251e2e6577743d9 22 | Slash/no-arc: d594faa2126764cad15ceb01b251e2e6577743d9 23 | 24 | COCOAPODS: 0.16.4 25 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/MTStringAttributes/MTStringAttributes.h: -------------------------------------------------------------------------------- 1 | ../../MTStringAttributes/MTStringAttributes/MTStringAttributes.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/MTStringAttributes/MTStringParser.h: -------------------------------------------------------------------------------- 1 | ../../MTStringAttributes/MTStringAttributes/MTStringParser.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/SLSErrors.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSErrors.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/SLSMarkupParser.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSMarkupParser.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/SLSTagLexer.gen.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTagLexer.gen.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/SLSTagParser.gen.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTagParser.gen.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/SLSTagParser.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTagParser.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/SLSTaggedRange.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTaggedRange.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/BuildHeaders/Slash/Slash.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/Slash.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/MTStringAttributes/MTStringAttributes.h: -------------------------------------------------------------------------------- 1 | ../../MTStringAttributes/MTStringAttributes/MTStringAttributes.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/MTStringAttributes/MTStringParser.h: -------------------------------------------------------------------------------- 1 | ../../MTStringAttributes/MTStringAttributes/MTStringParser.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/SLSErrors.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSErrors.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/SLSMarkupParser.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSMarkupParser.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/SLSTagLexer.gen.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTagLexer.gen.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/SLSTagParser.gen.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTagParser.gen.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/SLSTagParser.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTagParser.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/SLSTaggedRange.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/SLSTaggedRange.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Headers/Slash/Slash.h: -------------------------------------------------------------------------------- 1 | ../../Slash/Slash/Slash.h -------------------------------------------------------------------------------- /BeBoldMT/Pods/Local Podspecs/MTStringAttributes.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MTStringAttributes" 3 | s.version = "0.0.2" 4 | s.summary = "Makes it way easier to generate attribute dictionaries needed for NSAttributedString (on iOS)." 5 | s.homepage = "https://github.com/mysterioustrousers/MTStringAttributes" 6 | s.license = 'MIT' 7 | s.author = { "Adam Kirk" => "atomkirk@gmail.com" } 8 | s.source = { :git => "https://github.com/mysterioustrousers/MTStringAttributes.git", :tag => "0.0.2" } 9 | s.ios.deployment_target = '6.0' 10 | s.osx.deployment_target = '10.7' 11 | s.source_files = 'MTStringAttributes/*.{h,m}' 12 | s.frameworks = 'CoreGraphics', 'UIKit', 'Foundation' 13 | s.requires_arc = true 14 | s.dependency 'Slash', '~> 0.1' 15 | end 16 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/MTStringAttributes/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Mysterious Trousers, LLC (http://www.mysterioustrousers.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/MTStringAttributes/MTStringAttributes.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MTStringAttributes" 3 | s.version = "0.0.2" 4 | s.summary = "Makes it way easier to generate attribute dictionaries needed for NSAttributedString (on iOS)." 5 | s.homepage = "https://github.com/mysterioustrousers/MTStringAttributes" 6 | s.license = 'MIT' 7 | s.author = { "Adam Kirk" => "atomkirk@gmail.com" } 8 | s.source = { :git => "https://github.com/mysterioustrousers/MTStringAttributes.git", :tag => "0.0.2" } 9 | s.ios.deployment_target = '6.0' 10 | s.osx.deployment_target = '10.7' 11 | s.source_files = 'MTStringAttributes/*.{h,m}' 12 | s.frameworks = 'CoreGraphics', 'UIKit', 'Foundation' 13 | s.requires_arc = true 14 | s.dependency 'Slash', '~> 0.1' 15 | end 16 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/MTStringAttributes/MTStringAttributes/MTStringAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // MTStringAttributes.h 3 | // MTStringAttributes 4 | // 5 | // Created by Adam Kirk on 2/12/13. 6 | // Copyright (c) 2013 Mysterious Trousers. All rights reserved. 7 | // 8 | 9 | 10 | @interface MTStringAttributes : NSObject 11 | 12 | // Basics 13 | @property (strong, nonatomic) id font; // UIFont || NSFont 14 | @property (strong, nonatomic) id textColor; // UIColor || NSColor 15 | @property (strong, nonatomic) id backgroundColor; // UIColor || NSColor 16 | @property ( nonatomic) BOOL strikethrough; 17 | @property ( nonatomic) BOOL underline; 18 | 19 | // Advanced 20 | @property ( nonatomic) BOOL ligatures; // Allow some characters to be combined 21 | @property (strong, nonatomic) NSNumber *kern; // distance between characters 22 | @property (strong, nonatomic) id outlineColor; // UIColor || NSColor 23 | @property (strong, nonatomic) NSNumber *outlineWidth; 24 | 25 | // Paragraph Style 26 | @property (strong, nonatomic) NSParagraphStyle *paragraphStyle; 27 | 28 | // Shadow 29 | @property (strong, nonatomic) NSNumber *shadowBlurRadius; 30 | @property (strong, nonatomic) id shadowColor; // UIColor || NSColor 31 | @property (strong, nonatomic) NSNumber *shadowOffsetX; 32 | @property (strong, nonatomic) NSNumber *shadowOffsetY; 33 | 34 | 35 | - (NSDictionary *)dictionary; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/MTStringAttributes/MTStringAttributes/MTStringParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // MTString.h 3 | // MTStringAttributes 4 | // 5 | // Created by Adam Kirk on 2/12/13. 6 | // Copyright (c) 2013 Mysterious Trousers. All rights reserved. 7 | // 8 | 9 | #import "MTStringAttributes.h" 10 | 11 | 12 | @interface MTStringParser : NSObject 13 | 14 | + (MTStringParser *)sharedParser; 15 | 16 | 17 | #pragma mark - Set Styles 18 | 19 | - (void)setDefaultAttributes:(MTStringAttributes *)attributes; 20 | 21 | - (void)setAttributes:(MTStringAttributes *)attributes forTag:(NSString *)tag; 22 | 23 | 24 | #pragma mark - Convenience 25 | 26 | - (void)addStyleWithTagName:(NSString *)tagName font:(id)font; 27 | 28 | - (void)addStyleWithTagName:(NSString *)tagName 29 | font:(id)font 30 | color:(id)color; 31 | 32 | - (void)addStyleWithTagName:(NSString *)tagName 33 | font:(id)font 34 | color:(id)color 35 | backgroundColor:(id)backgroundColor 36 | strikethrough:(BOOL)strikethrough 37 | underline:(BOOL)underline; 38 | 39 | 40 | #pragma mark - Parse Markup To Attributed String 41 | 42 | - (NSAttributedString *)attributedStringFromMarkup:(NSString *)markup; 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Pods-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | install_resource() 4 | { 5 | case $1 in 6 | *.storyboard) 7 | echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 8 | ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 9 | ;; 10 | *.xib) 11 | echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 12 | ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 13 | ;; 14 | *.framework) 15 | echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 16 | rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 17 | ;; 18 | *.xcdatamodeld) 19 | echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" 20 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" 21 | ;; 22 | *) 23 | echo "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 24 | cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 25 | ;; 26 | esac 27 | } 28 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Pods.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = YES 2 | HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS} 3 | OTHER_LDFLAGS = -ObjC -framework CoreGraphics -framework Foundation -framework UIKit 4 | PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/MTStringAttributes" "${PODS_ROOT}/BuildHeaders/Slash" 5 | PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS} 6 | PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/MTStringAttributes" "${PODS_ROOT}/Headers/Slash" 7 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /BeBoldMT/Pods/PodsDummy_Pods.m: -------------------------------------------------------------------------------- 1 | @interface PodsDummy_Pods : NSObject 2 | @end 3 | @implementation PodsDummy_Pods 4 | @end 5 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Chris Devereux 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Slash" 3 | s.version = "0.1" 4 | s.summary = "A simple, extensible, language for styling attributed strings." 5 | s.description = <<-DESC 6 | A simple, extensible markup language for styling NSAttributedStrings. The language is similar in appearance to HTML, however the tag vocabulary and styles can be easily customized by passing a dictionary argument to the parser. 7 | DESC 8 | s.homepage = "https://github.com/chrisdevereux/Slash" 9 | s.license = { :type => 'MIT', :file => 'LICENCE' } 10 | s.author = { "Chris Devereux" => "devereux.chris@gmail.com" } 11 | s.source = { :git => "https://github.com/chrisdevereux/Slash.git", :tag => "0.1" } 12 | 13 | s.ios.deployment_target = '4.3' 14 | s.osx.deployment_target = '10.6' 15 | 16 | s.public_header_files = 'Slash/Slash.h', 'Slash/SLSMarkupParser.h', 'Slash/SLSErrors.h' 17 | 18 | s.subspec 'arc' do |ss| 19 | ss.source_files = 'Slash/SLSMarkupParser.m', 'Slash/SLSTaggedRange.m', 'Slash/*.h' 20 | s.requires_arc = true 21 | end 22 | 23 | s.subspec 'no-arc' do |ss| 24 | ss.source_files = 'Slash/SLSTagParser.m', 'Slash/SLSTagLexer.gen.m', 'Slash/SLSTagParser.gen.m', 'Slash/*.h' 25 | ss.requires_arc = false 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/SLSErrors.h: -------------------------------------------------------------------------------- 1 | // 2 | // SLSErrors.h 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 29/01/2013. 6 | // Copyright (c) 2013 ChrisDevereux. All rights reserved. 7 | // 8 | 9 | typedef enum { 10 | kSLSSyntaxError = 1, 11 | kSLSUnknownTagError 12 | } SLSErrorCode; 13 | 14 | OBJC_EXTERN NSString * const SLSErrorDomain; 15 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/SLSMarkupParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // SLSMarkupParser.h 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 13/12/2012. 6 | // Copyright (c) 2012 Chris Devereux. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SLSMarkupParser : NSObject 12 | 13 | /** 14 | Returns an NSAttributedString styled using _style_. 15 | 16 | Style dictionary keys should name a tag. 17 | 18 | Style dictionary values should be a dictionary mapping attribute 19 | names to attribute values, suitable for passing to NSAttributedString's 20 | setAttributes: method. 21 | 22 | Example: 23 | NSString *markup = @"This is awesome!" 24 | NSDictionary *style = @{ 25 | @"strong": @{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:14]} 26 | }; 27 | 28 | NSAttributedString *attributedString = [SLSMarkupParser attributedStringWithMarkup:markup style:style error:NULL]; 29 | 30 | 31 | When a piece of text belongs to multiple elements, the attributes applied 32 | will be the union of each tag's dictionary, with the innermost elements' 33 | attributes taking priority. 34 | 35 | As a convenience, you may provide a style with a $default key. The associated attributes will 36 | provide a base style for the whole string, as if you had enclosed your markup in 37 | with <$default> 38 | */ 39 | 40 | + (NSAttributedString *)attributedStringWithMarkup:(NSString *)string 41 | style:(NSDictionary *)style 42 | error:(NSError **)error; 43 | 44 | /** 45 | Returns an NSAttributedString styled using [SLSMarkupParser defaultStyle], 46 | or nil if an error occured. 47 | 48 | @important 49 | Note that on versions of iOS prior to 6.0, [SLSMarkupParser defaultStyle] returns nil, 50 | so this method will return an unformatted string. 51 | */ 52 | + (NSAttributedString *)attributedStringWithMarkup:(NSString *)string 53 | error:(NSError **)error; 54 | 55 | /** 56 | Returns a dictionary defining the tags h1,h2,h3,h4,h5,h6,em,strong in various 57 | sizes and styles of Helvetica Neue. 58 | 59 | @important 60 | On versions of iOS prior to 6.0, this method returns nil. 61 | */ 62 | + (NSDictionary *)defaultStyle; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/SLSTagParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // SLSParseContext.h 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 29/01/2013. 6 | // Copyright (c) 2013 ChrisDevereux. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class SLSTaggedRange; 12 | 13 | 14 | @interface SLSTagParser : NSObject 15 | 16 | - (void)parseMarkup:(NSString *)markup; 17 | 18 | 19 | // Callbacks from parser function: 20 | 21 | - (void)addTag:(SLSTaggedRange *)tag; 22 | - (void)appendString:(NSString *)string; 23 | 24 | @property (assign, readonly, nonatomic) NSUInteger currentLength; 25 | 26 | 27 | // Parse result: 28 | 29 | // Set after parseMarkup: is called. 30 | // Contains instances of SLSTaggedRange, ordered where each occures before 31 | // any tagged ranges it contains. 32 | @property (strong, readonly, nonatomic) NSArray *taggedRanges; 33 | 34 | // Set after parseMarkup: is called. 35 | // An instance of NSMutableAttributedString containing the input text, 36 | // stripped of any markup tags, without any attributes applied. 37 | @property (strong, readonly, nonatomic) NSMutableAttributedString *attributedString; 38 | 39 | // Set after parseMarkup is called. 40 | // Either an error or nil if the parse was successful. 41 | @property (strong, nonatomic) NSError *error; 42 | 43 | @end 44 | 45 | 46 | OBJC_EXTERN void SLSTagParser_error(void *scanner, SLSTagParser *ctx, const char *msg); 47 | 48 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/SLSTagParser.m: -------------------------------------------------------------------------------- 1 | // 2 | // SLSParseContext.m 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 29/01/2013. 6 | // Copyright (c) 2013 ChrisDevereux. All rights reserved. 7 | // 8 | 9 | #import "SLSTagParser.h" 10 | #import "SLSTagLexer.gen.h" 11 | #import "SLSTagParser.gen.h" 12 | #import "SLSErrors.h" 13 | 14 | int SLSTagParser_parse(yyscan_t scanner, SLSTagParser *ctx); 15 | 16 | 17 | @implementation SLSTagParser { 18 | NSMutableArray *_taggedRanges; 19 | yyscan_t _scanner; 20 | BOOL _hasParsed; 21 | } 22 | 23 | @synthesize taggedRanges = _taggedRanges; 24 | 25 | - (id)init 26 | { 27 | self = [super init]; 28 | if (!self) 29 | return nil; 30 | 31 | SLSTagParser_lex_init(&_scanner); 32 | _attributedString = [[NSMutableAttributedString alloc] init]; 33 | _taggedRanges = [[NSMutableArray alloc] init]; 34 | 35 | return self; 36 | } 37 | 38 | - (void)dealloc 39 | { 40 | [_attributedString release]; 41 | [_taggedRanges release]; 42 | [_error release]; 43 | 44 | if (_scanner) { 45 | SLSTagParser_lex_destroy(_scanner); 46 | } 47 | 48 | [super dealloc]; 49 | } 50 | 51 | - (void)parseMarkup:(NSString *)markup 52 | { 53 | NSAssert(!_hasParsed, @"SLSTagParser is not reusable"); 54 | _hasParsed = YES; 55 | 56 | YY_BUFFER_STATE buf = SLSTagParser__scan_string([markup UTF8String], _scanner); 57 | SLSTagParser_parse(_scanner, self); 58 | SLSTagParser__delete_buffer(buf, _scanner); 59 | } 60 | 61 | - (void)addTag:(SLSTaggedRange *)tag 62 | { 63 | [_taggedRanges insertObject:tag atIndex:0]; 64 | } 65 | 66 | - (void)appendString:(NSString *)string 67 | { 68 | [_attributedString.mutableString appendString:string]; 69 | } 70 | 71 | - (NSUInteger)currentLength 72 | { 73 | return _attributedString.length; 74 | } 75 | 76 | @end 77 | 78 | void SLSTagParser_error(void *scanner, SLSTagParser *ctx, const char *msg) 79 | { 80 | ctx.error = [NSError errorWithDomain:SLSErrorDomain code:kSLSSyntaxError userInfo:@{NSLocalizedDescriptionKey : NSLocalizedString(@"Syntax error", nil)}]; 81 | } 82 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/SLSTaggedRange.h: -------------------------------------------------------------------------------- 1 | // 2 | // SLSTaggedRange.h 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 29/01/2013. 6 | // Copyright (c) 2013 ChrisDevereux. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SLSTaggedRange : NSObject 12 | 13 | + (instancetype)tagWithName:(NSString *)tagName range:(NSRange)range; 14 | 15 | @property (copy, readonly, nonatomic) NSString *tagName; 16 | @property (assign, readonly, nonatomic) NSRange range; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/SLSTaggedRange.m: -------------------------------------------------------------------------------- 1 | // 2 | // SLSTaggedRange.m 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 29/01/2013. 6 | // Copyright (c) 2013 ChrisDevereux. All rights reserved. 7 | // 8 | 9 | #import "SLSTaggedRange.h" 10 | 11 | @interface SLSTaggedRange () 12 | @property (copy, nonatomic) NSString *tagName; 13 | @property (assign, nonatomic) NSRange range; 14 | @end 15 | 16 | 17 | @implementation SLSTaggedRange 18 | 19 | + (instancetype)tagWithName:(NSString *)tagName range:(NSRange)range 20 | { 21 | SLSTaggedRange *taggedRange = [[self alloc] init]; 22 | 23 | taggedRange.tagName = tagName; 24 | taggedRange.range = range; 25 | 26 | return taggedRange; 27 | } 28 | 29 | - (NSString *)description 30 | { 31 | return [NSString stringWithFormat:@"%@ (%@)", _tagName, NSStringFromRange(_range)]; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /BeBoldMT/Pods/Slash/Slash/Slash.h: -------------------------------------------------------------------------------- 1 | // 2 | // Slash.h 3 | // Slash 4 | // 5 | // Created by Chris Devereux on 30/01/2013. 6 | // Copyright (c) 2013 ChrisDevereux. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | -------------------------------------------------------------------------------- /Columns/Columns/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Columns 4 | // 5 | // Created by Rob Napier on 8/26/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Columns/Columns/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Columns 4 | // 5 | // Created by Rob Napier on 8/26/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | @synthesize window = _window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Columns/Columns/ColumnView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ColumnView.h 3 | // Columns 4 | // 5 | // Created by Rob Napier on 8/26/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ColumnView : UIView 12 | @property (nonatomic, copy) NSAttributedString *attributedString; 13 | @end 14 | -------------------------------------------------------------------------------- /Columns/Columns/ColumnView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColumnView.swift 3 | // Columns 4 | // 5 | // Created by Rob Napier on 5/21/17. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | class ColumnView: UIView { 12 | 13 | let layoutManager = NSLayoutManager() 14 | 15 | let textStorage: NSTextStorage = NSTextStorage(string: "Test") 16 | 17 | @objc var attributedString: NSAttributedString = NSAttributedString() { 18 | didSet { 19 | // textStorage.setAttributedString(attributedString) 20 | } 21 | } 22 | 23 | let kColumnCount = 3 24 | 25 | func columnRects() -> [CGRect] { 26 | let box = bounds.insetBy(dx: 20, dy: 20) 27 | let columnWidth = floor(box.width / CGFloat(kColumnCount)) 28 | let size = CGSize(width: columnWidth, height: box.height) 29 | 30 | return stride(from: box.minX, through: (box.maxX - columnWidth), by: columnWidth) 31 | .map { leftX in CGRect(origin: CGPoint(x: leftX, y: box.minY), size: size) } 32 | .map { $0.insetBy(dx: 10, dy: 10) } 33 | } 34 | 35 | 36 | override init(frame: CGRect) { 37 | super.init(frame: frame) 38 | 39 | textStorage.addLayoutManager(layoutManager) 40 | 41 | let subviews = columnRects().map { rect -> UITextView in 42 | let container = NSTextContainer(size: rect.size) 43 | layoutManager.addTextContainer(container) 44 | return UITextView(frame: rect, textContainer: container) 45 | } 46 | 47 | for view in subviews { 48 | self.addSubview(view) 49 | } 50 | } 51 | 52 | required init?(coder aDecoder: NSCoder) { 53 | fatalError("init(coder:) has not been implemented") 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Columns/Columns/Columns-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /Columns/Columns/Columns-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | net.robnapier.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | UIMainStoryboardFile 30 | MainStoryboard 31 | UISupportedInterfaceOrientations~ipad 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationPortraitUpsideDown 35 | UIInterfaceOrientationLandscapeLeft 36 | UIInterfaceOrientationLandscapeRight 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Columns/Columns/Columns-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Columns' target in the 'Columns' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Columns/Columns/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Columns 4 | // 5 | // Created by Rob Napier on 8/26/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Columns/Columns/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Columns/Columns/en.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Columns/Columns/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Columns 4 | // 5 | // Created by Rob Napier on 8/26/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DrawText/DrawText/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DrawText/DrawText/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /DrawText/DrawText/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/DrawText/DrawText/Default-568h@2x.png -------------------------------------------------------------------------------- /DrawText/DrawText/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/DrawText/DrawText/Default.png -------------------------------------------------------------------------------- /DrawText/DrawText/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/DrawText/DrawText/Default@2x.png -------------------------------------------------------------------------------- /DrawText/DrawText/DrawText-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.robnapier.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /DrawText/DrawText/DrawText-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'DrawText' target in the 'DrawText' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /DrawText/DrawText/TextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TextView.h 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TextView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DrawText/DrawText/TextView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TextView.m 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "TextView.h" 10 | 11 | @implementation TextView 12 | 13 | - (id)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code 18 | } 19 | return self; 20 | } 21 | 22 | - (void)drawRect:(CGRect)rect 23 | { 24 | 25 | // NSStringDrawingContext *context = [[NSStringDrawingContext alloc] init]; 26 | // [as drawWithRect:CGRectMake(0, 200, 50, CGFLOAT_MAX) 27 | // options:0 28 | // context:context]; 29 | 30 | // UIRectFrame([context totalBounds]); 31 | 32 | 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /DrawText/DrawText/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DrawText/DrawText/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | } 22 | 23 | - (void)didReceiveMemoryWarning 24 | { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /DrawText/DrawText/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /DrawText/DrawText/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DrawText 4 | // 5 | // Created by Rob Napier on 11/22/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PinchText/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Demonstrates PinchTextView 4 | // 5 | 6 | #import 7 | 8 | @class PinchTextView; 9 | @interface AppDelegate : NSObject 10 | 11 | @property (nonatomic, readwrite, strong) IBOutlet UIWindow *window; 12 | @property (nonatomic, readwrite, strong) IBOutlet PinchTextView *view; 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /PinchText/Classes/PinchTextLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // PinchTextLayer.h 3 | // Displays an attributed string and pinches it towards touches. 4 | // 5 | 6 | #import 7 | 8 | @interface PinchTextLayer : CALayer 9 | @property (nonatomic, readwrite, copy) NSAttributedString *attributedString; 10 | 11 | - (void)addTouches:(NSSet *)touches inView:(UIView *)view scale:(CGFloat)scale; 12 | - (void)updateTouches:(NSSet *)touches inView:(UIView *)view; 13 | - (void)removeTouches:(NSSet *)touches; 14 | @end 15 | -------------------------------------------------------------------------------- /PinchText/Classes/PinchTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PinchTextView.h 3 | // Displays an attributed string and pinches it towards touches. 4 | // 5 | 6 | #import 7 | #import 8 | 9 | @interface PinchTextView : UIView 10 | @property (nonatomic, readwrite, copy) NSAttributedString *attributedString; 11 | @end 12 | -------------------------------------------------------------------------------- /PinchText/Classes/PinchTextView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PinchTextView.m 3 | // 4 | // Displays an attributed string and pinches it towards touches. 5 | 6 | #import "PinchTextView.h" 7 | 8 | #import 9 | 10 | #import "PinchTextLayer.h" 11 | 12 | @implementation PinchTextView 13 | 14 | #pragma mark - 15 | #pragma mark UIView 16 | 17 | + (Class)layerClass 18 | { 19 | return [PinchTextLayer class]; 20 | } 21 | 22 | #pragma mark - 23 | #pragma mark Init 24 | 25 | - (id)initWithFrame:(CGRect)frame 26 | { 27 | self = [super initWithFrame:frame]; 28 | if (self != nil) { 29 | [self finishInit]; 30 | } 31 | return self; 32 | } 33 | 34 | - (void)awakeFromNib 35 | { 36 | [super awakeFromNib]; 37 | [self finishInit]; 38 | } 39 | 40 | - (void)finishInit 41 | { 42 | self.layer.geometryFlipped = YES; 43 | self.contentScaleFactor = [[UIScreen mainScreen] scale]; 44 | } 45 | 46 | #pragma mark - 47 | #pragma mark UIResponder 48 | 49 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 50 | { 51 | [self.pinchTextLayer addTouches:touches inView:self scale:1000]; 52 | } 53 | 54 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 55 | { 56 | [self.pinchTextLayer updateTouches:touches inView:self]; 57 | } 58 | 59 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 60 | { 61 | [self.pinchTextLayer removeTouches:touches]; 62 | } 63 | 64 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; 65 | { 66 | [self.pinchTextLayer removeTouches:touches]; 67 | } 68 | 69 | #pragma mark - 70 | #pragma mark Accessors 71 | 72 | - (NSAttributedString *)attributedString { 73 | return [self.pinchTextLayer attributedString]; 74 | } 75 | 76 | - (void)setAttributedString:(NSAttributedString *)attributedString { 77 | [self.pinchTextLayer setAttributedString:attributedString]; 78 | } 79 | 80 | - (PinchTextLayer *)pinchTextLayer { 81 | return (PinchTextLayer*)self.layer; 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /PinchText/Classes/TouchPoint.h: -------------------------------------------------------------------------------- 1 | // 2 | // TouchPoint.h 3 | // Represents a touched point (including scale) 4 | // 5 | 6 | #import 7 | 8 | @interface TouchPoint : NSObject 9 | @property (nonatomic, readwrite, strong) UITouch *touch; 10 | @property (nonatomic, readwrite, assign) CGPoint point; 11 | @property (nonatomic, readwrite, assign) CGFloat scale; // How much does this touch impact the pinch effect? 12 | 13 | + (TouchPoint *)touchPointForTouch:(UITouch *)touch inView:(UIView *)view scale:(CGFloat)scale; 14 | - (NSString *)identifier; 15 | @end 16 | -------------------------------------------------------------------------------- /PinchText/Classes/TouchPoint.m: -------------------------------------------------------------------------------- 1 | // 2 | // TouchPoint.m 3 | // Represents a touched point (including scale) 4 | // 5 | 6 | #import "TouchPoint.h" 7 | 8 | @implementation TouchPoint 9 | 10 | + (TouchPoint *)touchPointForTouch:(UITouch *)aTouch inView:(UIView *)aView scale:(CGFloat)aScale 11 | { 12 | TouchPoint *touchPoint = [TouchPoint new]; 13 | touchPoint.touch = aTouch; 14 | touchPoint.scale = aScale; 15 | touchPoint.point = [aTouch locationInView:aView]; 16 | return touchPoint; 17 | } 18 | 19 | - (NSString *)identifier { 20 | return [NSString stringWithFormat:@"%p", self]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /PinchText/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /PinchText/PinchText-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /PinchText/PinchText.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/PinchText/PinchText.mov -------------------------------------------------------------------------------- /PinchText/PinchText_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TextDemo' target in the 'TextDemo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /PinchText/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TextDemo 4 | // 5 | // Created by Rob on 9/7/10. 6 | // Copyright My Company 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | richtext-coretext 2 | ================= 3 | 4 | Sample Code from Rich Text, Core Text -------------------------------------------------------------------------------- /RTL/RTL/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // RTL 4 | // 5 | // Created by Rob Napier on 11/9/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RTL/RTL/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // RTL 4 | // 5 | // Created by Rob Napier on 11/9/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /RTL/RTL/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/RTL/RTL/Default-568h@2x.png -------------------------------------------------------------------------------- /RTL/RTL/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/RTL/RTL/Default.png -------------------------------------------------------------------------------- /RTL/RTL/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/RTL/RTL/Default@2x.png -------------------------------------------------------------------------------- /RTL/RTL/RTL-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | net.robnapier.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /RTL/RTL/RTL-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RTL' target in the 'RTL' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /RTL/RTL/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // RTL 4 | // 5 | // Created by Rob Napier on 11/9/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | @property (weak, nonatomic) IBOutlet UILabel *label1e; 13 | @property (weak, nonatomic) IBOutlet UILabel *label1a; 14 | @property (weak, nonatomic) IBOutlet UILabel *label2e; 15 | @property (weak, nonatomic) IBOutlet UILabel *label2a; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /RTL/RTL/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // RTL 4 | // 5 | // Created by Rob Napier on 11/9/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | NSString *format1 = @"Hello, %@. How are you?"; 22 | 23 | self.label1e.text = [NSString stringWithFormat:format1, @"John"]; 24 | self.label1a.text = [NSString stringWithFormat:format1, @"سمير"]; 25 | 26 | NSString *format2 = @"%@, how are you?"; 27 | self.label2e.text = [NSString stringWithFormat:format2, @"John"]; 28 | self.label2a.text = [NSString stringWithFormat:format2, @"سمير"]; 29 | 30 | } 31 | 32 | - (void)didReceiveMemoryWarning 33 | { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /RTL/RTL/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /RTL/RTL/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RTL 4 | // 5 | // Created by Rob Napier on 11/9/12. 6 | // Copyright (c) 2012 Rob Napier. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Rich Text, Core Text 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/Rich Text, Core Text 2.pdf -------------------------------------------------------------------------------- /Rich Text, Core Text.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnapier/richtext-coretext/4d5539d0bdbd829ebe62b10440fbd24962815c4e/Rich Text, Core Text.pdf --------------------------------------------------------------------------------