Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding sample project

  • Loading branch information...
commit 6fdfa8ab0d8a52745e473e3f88c08d021483af26 1 parent d9b2664
Simon Maddox authored
41 Classes/SMFancyText.h
View
@@ -0,0 +1,41 @@
+//
+// SMFancyText.h
+// SMFancyText
+//
+// Created by Simon Maddox on 12/08/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <libxml/htmlparser.h>
+
+@class SMFancyTextElement;
+
+
+@protocol SMFancyTextDelegate <NSObject>
+
+- (void) linkPressed:(UIButton *)link;
+
+@end
+
+@interface SMFancyText : UIView {
+ NSString *text;
+ id <SMFancyTextDelegate> delegate;
+
+ @private
+ UIColor *_textColor;
+ htmlParserCtxtPtr context;
+ NSMutableArray *elements;
+ SMFancyTextElement *currentElement;
+ CGPoint currentPosition;
+}
+
+@property (nonatomic, retain) UIColor *textColor;
+@property (nonatomic, assign) id <SMFancyTextDelegate> delegate;
+
+@property (nonatomic, retain) SMFancyTextElement *currentElement;
+@property (nonatomic, retain) NSMutableArray *elements;
+
+- (void) setText: (NSString *) newText;
+
+@end
429 Classes/SMFancyText.m
View
@@ -0,0 +1,429 @@
+//
+// SMFancyText.m
+// SMFancyText
+//
+// Created by Simon Maddox on 12/08/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import "SMFancyText.h"
+
+#define HTMLBullet @""
+
+#pragma mark -
+#pragma mark LibXML Headers
+
+
+void startElementSAX (void * ctx, const xmlChar * name, const xmlChar ** atts);
+void endElementSAX (void * ctx, const xmlChar * name);
+void charactersFound (void * ctx, const xmlChar * ch, int len);
+void endDocumentSAX (void * ctx);
+void errorEncountered (void *ctx, const char *msg, ...);
+
+static xmlSAXHandler simpleSAXHandlerStruct;
+
+
+#pragma mark -
+#pragma mark SMFancyTextElement
+
+typedef enum
+{
+ SMFancyTextElementStyleNormal,
+ SMFancyTextElementStyleBold,
+ SMFancyTextElementStyleItalic,
+ SMFancyTextElementStyleNewLine,
+ SMFancyTextElementStyleParagraphBreak,
+ SMFancyTextElementStyleListItem,
+ SMFancyTextElementStyleBlockQuote,
+ SMFancyTextElementStyleLink,
+ SMFancyTextElementStyleImage,
+ SMFancyTextElementStyleImageLink
+} SMFancyTextElementStyle;
+
+@interface SMFancyTextElement : NSObject
+{
+ NSString *text;
+ SMFancyTextElementStyle style;
+ UIColor *textColor;
+ NSString *link;
+ NSString *imageName;
+}
+
+@property (nonatomic, retain) NSString *text;
+@property SMFancyTextElementStyle style;
+@property (nonatomic, retain) NSString *link;
+@property (nonatomic, retain) NSString *imageName;
+
+@end
+
+#pragma mark -
+#pragma mark SMFancyText
+
+@interface SMFancyText ()
+
+- (void) saveCurrentElement;
+- (void) drawString:(NSString *) string withFont:(UIFont *) font atPoint:(CGPoint) point inRect:(CGRect) rect recursive:(BOOL) recursive style:(SMFancyTextElementStyle) style withLink:(NSString *) link image:(NSString *) image;
+- (NSString *) removeLeadingWhiteSpaceFromString:(NSString *) string;
+
+@end
+
+
+@implementation SMFancyText
+
+@synthesize currentElement, elements, textColor = _textColor, delegate;
+
+- (id)initWithFrame:(CGRect)frame {
+ if ((self = [super initWithFrame:frame])) {
+ self.elements = [NSMutableArray array];
+ }
+ return self;
+}
+
+- (void)drawRect:(CGRect)rect
+{
+ CGContextRef graphicsContext = UIGraphicsGetCurrentContext();
+
+ if (self.textColor == nil){
+ self.textColor = [UIColor blackColor];
+ }
+
+ CGContextSetFillColorWithColor(graphicsContext, [self.textColor CGColor]);
+
+ for (NSInteger i = 0; i < [self.elements count]; i++){
+ UIFont *font = nil;
+
+ switch ([[self.elements objectAtIndex:i] style]) {
+ case SMFancyTextElementStyleBold:
+ case SMFancyTextElementStyleBlockQuote:
+ font = [UIFont boldSystemFontOfSize:14.0];
+ break;
+ case SMFancyTextElementStyleItalic:
+ font = [UIFont italicSystemFontOfSize:14.0];
+ break;
+ default:
+ font = [UIFont systemFontOfSize:14.0];
+ break;
+ }
+
+ if ([[self.elements objectAtIndex:i] style] == SMFancyTextElementStyleBlockQuote){
+ CGContextFillRect(graphicsContext, CGRectMake(0, currentPosition.y - 5, rect.size.width, 2));
+ }
+
+ if ([[self.elements objectAtIndex:i] style] == SMFancyTextElementStyleParagraphBreak){
+ currentPosition.x = 0;
+ currentPosition.y = currentPosition.y + (18 * 2);
+ } else if ([[self.elements objectAtIndex:i] style] == SMFancyTextElementStyleNewLine){
+ currentPosition.x = 0;
+ currentPosition.y = currentPosition.y + 18;
+ } else {
+ [self drawString:[[self.elements objectAtIndex:i] text] withFont:font atPoint:currentPosition inRect:rect recursive:YES style:[[self.elements objectAtIndex:i] style] withLink:[[self.elements objectAtIndex:i] link] image:[[self.elements objectAtIndex:i] imageName]];
+ }
+
+ if ([[self.elements objectAtIndex:i] style] == SMFancyTextElementStyleBlockQuote){
+ CGContextFillRect(graphicsContext, CGRectMake(0, currentPosition.y + 20, rect.size.width, 2));
+ }
+ }
+}
+
+- (void) drawString:(NSString *) string withFont:(UIFont *) font atPoint:(CGPoint) point inRect:(CGRect) rect recursive:(BOOL) recursive style:(SMFancyTextElementStyle) style withLink:(NSString *) link image:(NSString *) image
+{
+ if (point.x == 0){
+ string = [self removeLeadingWhiteSpaceFromString:string];
+ }
+
+ CGSize size = [string sizeWithFont:font];
+
+ if (point.x + size.width > rect.size.width){
+ if (recursive){
+ NSArray *words = [string componentsSeparatedByString:@" "];
+ for (NSInteger i = 0; i < [words count]; i++){
+ if (i < [words count] - 1){
+ [self drawString:[NSString stringWithFormat:@"%@ ", [words objectAtIndex:i]] withFont:font atPoint:currentPosition inRect:rect recursive:NO style:style withLink:link image:image];
+ } else {
+ [self drawString:[NSString stringWithFormat:@"%@", [words objectAtIndex:i]] withFont:font atPoint:currentPosition inRect:rect recursive:NO style:style withLink:link image:image];
+ }
+ }
+ return;
+ } else {
+ [self drawString:string withFont:font atPoint:CGPointMake(0, currentPosition.y + size.height) inRect:rect recursive:NO style:style withLink:link image:image];
+ return;
+ }
+ }
+
+ if (size.width <= rect.size.width && currentPosition.x + size.width > rect.size.width){
+ currentPosition.y += size.height;
+ currentPosition.x = 0;
+ }
+
+ CGRect theRect = CGRectMake(currentPosition.x, currentPosition.y, size.width, size.height);
+
+ if (link != nil || image != nil){
+ CGContextRef graphicsContext = UIGraphicsGetCurrentContext();
+
+ if (style == SMFancyTextElementStyleLink){
+ if ([delegate respondsToSelector:@selector(linkPressed:)]){
+ UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
+ [button setFrame:theRect];
+ [button setTitle:link forState:UIControlStateNormal];
+ [button setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
+ [button addTarget:self action:@selector(linkTouchUp:) forControlEvents:UIControlEventTouchUpInside];
+ [button addTarget:self action:@selector(linkPressed:) forControlEvents:UIControlEventTouchDown];
+ [self addSubview:button];
+
+ CGContextSetFillColorWithColor(graphicsContext, [[UIColor colorWithRed:65.0/255.0 green:123.0/255.0 blue:192.0/255.0 alpha:1] CGColor]);
+ CGContextFillRect(graphicsContext, CGRectMake(currentPosition.x, currentPosition.y + (theRect.size.height - 2), theRect.size.width, 1));
+ [string drawInRect:theRect withFont:font];
+ CGContextSetFillColorWithColor(graphicsContext, [self.textColor CGColor]);
+ }
+ } else if (style == SMFancyTextElementStyleImage){
+ UIImage *theImage = [UIImage imageNamed:image];
+ [theImage drawInRect:CGRectMake((self.frame.size.width / 2) - (theImage.size.width / 2), currentPosition.y, theImage.size.width, theImage.size.height)];
+ currentPosition.y += theImage.size.height;
+ } else if (style == SMFancyTextElementStyleImageLink){
+ UIImage *theImage = [UIImage imageNamed:image];
+
+ CGRect imageFrame = CGRectMake((self.frame.size.width / 2) - (theImage.size.width / 2), currentPosition.y, theImage.size.width, theImage.size.height);
+ [theImage drawInRect:imageFrame];
+
+ UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
+ [button setFrame:imageFrame];
+ [button setTitle:link forState:UIControlStateNormal];
+ [button setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
+ [button addTarget:delegate action:@selector(linkPressed:) forControlEvents:UIControlEventTouchUpInside];
+ [self addSubview:button];
+
+ currentPosition.y += theImage.size.height;
+ }
+ } else {
+ [string drawInRect:theRect withFont:font];
+ }
+
+ currentPosition = CGPointMake(currentPosition.x + size.width, currentPosition.y);
+}
+
+- (void) linkPressed:(UIButton *) button
+{
+ [button setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.2]];
+}
+
+- (void) linkTouchUp: (UIButton *) button
+{
+ [button setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0]];
+ [delegate linkPressed:button];
+}
+
+- (void) setText:(NSString *)newText
+{
+ NSData *data = [[NSString stringWithFormat:@"<SMFancyText>%@</SMFancyText>",[newText stringByReplacingOccurrencesOfString:@"\n" withString:@""]] dataUsingEncoding:NSUTF8StringEncoding];
+
+ context = htmlCreatePushParserCtxt(&simpleSAXHandlerStruct, self, NULL, 0, NULL, 0);
+ htmlParseChunk(context, (const char *)[data bytes], [data length], 0);
+}
+
+- (NSString *) removeLeadingWhiteSpaceFromString:(NSString *) string
+{
+ if (string == nil){
+ return nil;
+ }
+
+ NSMutableString *mutableString = [NSMutableString stringWithString:string];
+
+ for (NSInteger i = 0; i < [string length]; i++){
+ if ([[mutableString substringToIndex:1] isEqualToString:@" "]){
+ [mutableString deleteCharactersInRange:NSMakeRange(0, 1)];
+ }
+ }
+
+ return [NSString stringWithString:mutableString];
+}
+
+- (void)dealloc {
+ self.text = nil;
+ self.currentElement = nil;
+ [super dealloc];
+}
+
+- (void) saveCurrentElement
+{
+ if (self.currentElement == nil){
+ return;
+ }
+ [self.elements addObject:self.currentElement];
+ self.currentElement = nil;
+}
+
+
+#pragma mark -
+#pragma mark LibXML
+
+void startElement (void * ctx, const xmlChar * name, const xmlChar ** atts)
+{
+ SMFancyText *textView = (SMFancyText *) ctx;
+
+ if (textView.currentElement.style == SMFancyTextElementStyleLink && !strcmp((char *)name, "img")){
+ textView.currentElement.style = SMFancyTextElementStyleImageLink;
+
+ for (NSInteger i = 0; i < sizeof(atts); i++){
+ if (!strcmp((char *)atts[i], "src")){
+ textView.currentElement.imageName = [NSString stringWithCString:(const char *) atts[i+1] encoding:NSUTF8StringEncoding];
+ break;
+ }
+ }
+
+ return;
+
+ } else if (textView.currentElement != nil){
+ [textView saveCurrentElement];
+ }
+
+ // first, insert newlines/paragraphs where needed
+
+ if (!strcmp((char *)name, "blockquote") || !strcmp((char *)name, "img")){
+ SMFancyTextElement *element = [[[SMFancyTextElement alloc] init] autorelease];
+ element.style = SMFancyTextElementStyleNewLine;
+ textView.currentElement = element;
+ [textView saveCurrentElement];
+ }
+
+ SMFancyTextElement *element = [[[SMFancyTextElement alloc] init] autorelease];
+
+ if (!strcmp((char *)name, "strong") || !strcmp((char *)name, "b")){
+ element.style = SMFancyTextElementStyleBold;
+ } else if (!strcmp((char *)name, "em") || !strcmp((char *)name, "i")){
+ element.style = SMFancyTextElementStyleItalic;
+ } else if (!strcmp((char *)name, "li")){
+ element.style = SMFancyTextElementStyleListItem;
+ } else if (!strcmp((char *)name, "ul")){
+ element.style = SMFancyTextElementStyleNewLine;
+ } else if (!strcmp((char *)name, "blockquote")){
+ element.style = SMFancyTextElementStyleBlockQuote;
+ } else if (!strcmp((char *)name, "a")){
+ element.style = SMFancyTextElementStyleLink;
+ for (NSInteger i = 0; i < sizeof(atts); i++){
+ if (!strcmp((char *)atts[i], "href")){
+ element.link = [NSString stringWithCString:(const char *) atts[i+1] encoding:NSUTF8StringEncoding];
+ break;
+ }
+ }
+ } else if (!strcmp((char *)name, "img")){
+ element.style = SMFancyTextElementStyleImage;
+ for (NSInteger i = 0; i < sizeof(atts); i++){
+ if (!strcmp((char *)atts[i], "src")){
+ element.link = [NSString stringWithCString:(const char *) atts[i+1] encoding:NSUTF8StringEncoding];
+ break;
+ }
+ }
+ } else {
+ element.style = SMFancyTextElementStyleNormal;
+ }
+
+ textView.currentElement = element;
+}
+
+void endElement (void * ctx, const xmlChar * name)
+{
+ SMFancyText *textView = (SMFancyText *) ctx;
+ [textView saveCurrentElement];
+
+ if (!strcmp((char *) name, "p") || !strcmp((char *) name, "li") || !strcmp((char *) name, "ul")){
+ SMFancyTextElement *element = [[[SMFancyTextElement alloc] init] autorelease];
+ element.style = SMFancyTextElementStyleNewLine;
+ textView.currentElement = element;
+ [textView saveCurrentElement];
+ } else if (!strcmp((char *) name, "blockquote")){
+ SMFancyTextElement *element = [[[SMFancyTextElement alloc] init] autorelease];
+ element.style = SMFancyTextElementStyleParagraphBreak;
+ textView.currentElement = element;
+ [textView saveCurrentElement];
+ }
+}
+
+void charactersFound (void * ctx, const xmlChar * ch, int len)
+{
+ SMFancyText *textView = (SMFancyText *) ctx;
+
+ if (textView.currentElement == nil){
+ SMFancyTextElement *element = [[[SMFancyTextElement alloc] init] autorelease];
+ element.style = SMFancyTextElementStyleNormal;
+ textView.currentElement = element;
+ }
+
+ if (textView.currentElement.style == SMFancyTextElementStyleListItem){
+ textView.currentElement.text = [NSString stringWithFormat:@"%@ %@", HTMLBullet, [NSString stringWithCString:(const char *) ch encoding:NSUTF8StringEncoding]];
+ } else {
+ textView.currentElement.text = [NSString stringWithCString:(const char *) ch encoding:NSUTF8StringEncoding];
+ }
+}
+
+void endDocument (void * ctx)
+{
+ SMFancyText *textView = (SMFancyText *) ctx;
+ [textView setNeedsDisplay];
+}
+
+void errorEncountered (void *ctx, const char *msg, ...)
+{
+
+}
+
+static htmlSAXHandler simpleSAXHandlerStruct = {
+ NULL, /* internalSubset */
+ NULL, /* isStandalone */
+ NULL, /* hasInternalSubset */
+ NULL, /* hasExternalSubset */
+ NULL, /* resolveEntity */
+ NULL, /* getEntity */
+ NULL, /* entityDecl */
+ NULL, /* notationDecl */
+ NULL, /* attributeDecl */
+ NULL, /* elementDecl */
+ NULL, /* unparsedEntityDecl */
+ NULL, /* setDocumentLocator */
+ NULL, /* startDocument */
+ endDocument, /* endDocument */
+ startElement, /* startElement*/
+ endElement, /* endElement */
+ NULL, /* reference */
+ charactersFound, /* characters */
+ NULL, /* ignorableWhitespace */
+ NULL, /* processingInstruction */
+ NULL, /* comment */
+ NULL, /* warning */
+ errorEncountered, /* error */
+ NULL, /* fatalError //: unused error() get all the errors */
+ NULL, /* getParameterEntity */
+ NULL, /* cdataBlock */
+ NULL, /* externalSubset */
+ XML_SAX2_MAGIC, //
+ NULL,
+ NULL, /* startElementNs */
+ NULL, /* endElementNs */
+ NULL, /* serror */
+};
+
+@end
+
+
+#pragma mark -
+#pragma mark SMFancyTextElement
+
+@implementation SMFancyTextElement
+
+@synthesize text, style, link, imageName;
+
+- (NSString *) description
+{
+ return [NSString stringWithFormat:@"SMFancyTextElement :: %@ - %d", text, style];
+}
+
+- (void) dealloc
+{
+ self.text = nil;
+ self.style = -1;
+ self.link = nil;
+ self.imageName = nil;
+
+ [super dealloc];
+}
+
+@end
22 Classes/SMFancyTextAppDelegate.h
View
@@ -0,0 +1,22 @@
+//
+// SMFancyTextAppDelegate.h
+// SMFancyText
+//
+// Created by Simon Maddox on 15/09/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class SMFancyTextViewController;
+
+@interface SMFancyTextAppDelegate : NSObject <UIApplicationDelegate> {
+ UIWindow *window;
+ SMFancyTextViewController *viewController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet SMFancyTextViewController *viewController;
+
+@end
+
88 Classes/SMFancyTextAppDelegate.m
View
@@ -0,0 +1,88 @@
+//
+// SMFancyTextAppDelegate.m
+// SMFancyText
+//
+// Created by Simon Maddox on 15/09/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import "SMFancyTextAppDelegate.h"
+#import "SMFancyTextViewController.h"
+
+@implementation SMFancyTextAppDelegate
+
+@synthesize window;
+@synthesize viewController;
+
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ // Add the view controller's view to the window and display.
+ [window addSubview:viewController.view];
+ [window makeKeyAndVisible];
+
+ return YES;
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ /*
+ 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.
+ 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.
+ */
+}
+
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ /*
+ 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.
+ If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ /*
+ Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
+ */
+}
+
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ /*
+ 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.
+ */
+}
+
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ /*
+ Called when the application is about to terminate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ /*
+ Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+ */
+}
+
+
+- (void)dealloc {
+ [viewController release];
+ [window release];
+ [super dealloc];
+}
+
+
+@end
17 Classes/SMFancyTextViewController.h
View
@@ -0,0 +1,17 @@
+//
+// SMFancyTextViewController.h
+// SMFancyText
+//
+// Created by Simon Maddox on 15/09/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "SMFancyText.h"
+
+@interface SMFancyTextViewController : UIViewController <SMFancyTextDelegate> {
+
+}
+
+@end
+
47 Classes/SMFancyTextViewController.m
View
@@ -0,0 +1,47 @@
+//
+// SMFancyTextViewController.m
+// SMFancyText
+//
+// Created by Simon Maddox on 15/09/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import "SMFancyTextViewController.h"
+
+@implementation SMFancyTextViewController
+
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ SMFancyText *fancyText = [[SMFancyText alloc] initWithFrame:CGRectMake(20, 20, 280, 420)];
+ [fancyText setText:@"<p>This is a long block of text that has no formatting at all. And <b>now we've got bold in the middle of a sentence</b> and even <i>italics (if you're not on an iPhone 4)</i></p><p><a href=\"http://google.com\">This is a link to Google</a></p><p><a href=\"http://apple.com\"><img src=\"safari.gif\" /></a></p><ul><li>And</li><li>this</li><li>is</li><li>a list</li></ul><blockquote>OMG shocking quote here. This is really a blockquote</blockquote>"];
+ [fancyText setBackgroundColor:[UIColor whiteColor]];
+ [fancyText setDelegate:self];
+ [self.view addSubview:fancyText];
+ [fancyText release];
+}
+
+- (void) linkPressed:(UIButton *) link
+{
+ NSLog(@"Opening: %@", [[link titleLabel] text]);
+}
+
+- (void)didReceiveMemoryWarning {
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
+}
+
+- (void)viewDidUnload {
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+@end
444 MainWindow.xib
View
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10D571</string>
+ <string key="IBDocument.InterfaceBuilderVersion">786</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">112</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="10"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIViewController" id="943309135">
+ <string key="IBUINibName">SMFancyTextViewController</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">viewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="943309135"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">SMFancyText App Delegate</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="943309135"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBEditorWindowLastContentRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBEditorWindowLastContentRect</string>
+ <string>12.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>SMFancyTextViewController</string>
+ <string>{{234, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{525, 346}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>SMFancyTextAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">15</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SMFancyTextAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>SMFancyTextViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">viewController</string>
+ <string key="candidateClassName">SMFancyTextViewController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/SMFancyTextAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SMFancyTextAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SMFancyTextViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/SMFancyTextViewController.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="356479594"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1024" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">SMFancyText.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">112</string>
+ </data>
+</archive>
30 SMFancyText-Info.plist
View
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
273 SMFancyText.xcodeproj/project.pbxproj
View
@@ -0,0 +1,273 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1D3623260D0F684500981E51 /* SMFancyTextAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SMFancyTextAppDelegate.m */; };
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
+ 2899E5220DE3E06400AC0155 /* SMFancyTextViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* SMFancyTextViewController.xib */; };
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
+ 28D7ACF80DDB3853001CB0EB /* SMFancyTextViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* SMFancyTextViewController.m */; };
+ F49697371240F8E8005F84ED /* SMFancyText.m in Sources */ = {isa = PBXBuildFile; fileRef = F49697361240F8E8005F84ED /* SMFancyText.m */; };
+ F49697441240FA2C005F84ED /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F49697431240FA2C005F84ED /* libxml2.dylib */; };
+ F49697721240FC61005F84ED /* safari.gif in Resources */ = {isa = PBXBuildFile; fileRef = F49697711240FC61005F84ED /* safari.gif */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623240D0F684500981E51 /* SMFancyTextAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFancyTextAppDelegate.h; sourceTree = "<group>"; };
+ 1D3623250D0F684500981E51 /* SMFancyTextAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMFancyTextAppDelegate.m; sourceTree = "<group>"; };
+ 1D6058910D05DD3D006BFB54 /* SMFancyText.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SMFancyText.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 2899E5210DE3E06400AC0155 /* SMFancyTextViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SMFancyTextViewController.xib; sourceTree = "<group>"; };
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
+ 28D7ACF60DDB3853001CB0EB /* SMFancyTextViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFancyTextViewController.h; sourceTree = "<group>"; };
+ 28D7ACF70DDB3853001CB0EB /* SMFancyTextViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMFancyTextViewController.m; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 32CA4F630368D1EE00C91783 /* SMFancyText_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFancyText_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* SMFancyText-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SMFancyText-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
+ F49697351240F8E8005F84ED /* SMFancyText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFancyText.h; sourceTree = "<group>"; };
+ F49697361240F8E8005F84ED /* SMFancyText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMFancyText.m; sourceTree = "<group>"; };
+ F49697431240FA2C005F84ED /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
+ F49697711240FC61005F84ED /* safari.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = safari.gif; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
+ F49697441240FA2C005F84ED /* libxml2.dylib in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 1D3623240D0F684500981E51 /* SMFancyTextAppDelegate.h */,
+ 1D3623250D0F684500981E51 /* SMFancyTextAppDelegate.m */,
+ 28D7ACF60DDB3853001CB0EB /* SMFancyTextViewController.h */,
+ 28D7ACF70DDB3853001CB0EB /* SMFancyTextViewController.m */,
+ F49697351240F8E8005F84ED /* SMFancyText.h */,
+ F49697361240F8E8005F84ED /* SMFancyText.m */,
+ );
+ path = Classes;
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* SMFancyText.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* SMFancyText_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 2899E5210DE3E06400AC0155 /* SMFancyTextViewController.xib */,
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */,
+ 8D1107310486CEB800E47090 /* SMFancyText-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ F49697711240FC61005F84ED /* safari.gif */,
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */,
+ F49697431240FA2C005F84ED /* libxml2.dylib */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* SMFancyText */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SMFancyText" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = SMFancyText;
+ productName = SMFancyText;
+ productReference = 1D6058910D05DD3D006BFB54 /* SMFancyText.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SMFancyText" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* SMFancyText */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
+ 2899E5220DE3E06400AC0155 /* SMFancyTextViewController.xib in Resources */,
+ F49697721240FC61005F84ED /* safari.gif in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ 1D3623260D0F684500981E51 /* SMFancyTextAppDelegate.m in Sources */,
+ 28D7ACF80DDB3853001CB0EB /* SMFancyTextViewController.m in Sources */,
+ F49697371240F8E8005F84ED /* SMFancyText.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = SMFancyText_Prefix.pch;
+ INFOPLIST_FILE = "SMFancyText-Info.plist";
+ PRODUCT_NAME = SMFancyText;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = SMFancyText_Prefix.pch;
+ INFOPLIST_FILE = "SMFancyText-Info.plist";
+ PRODUCT_NAME = SMFancyText;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = /usr/include/libxml2;
+ PREBINDING = NO;
+ SDKROOT = iphoneos4.1;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ PREBINDING = NO;
+ SDKROOT = iphoneos4.1;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SMFancyText" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SMFancyText" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
156 SMFancyTextViewController.xib
View
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">800</int>
+ <string key="IBDocument.SystemVersion">10C540</string>
+ <string key="IBDocument.InterfaceBuilderVersion">759</string>
+ <string key="IBDocument.AppKitVersion">1038.25</string>
+ <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">77</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="6"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>6.IBEditorWindowLastContentRect</string>
+ <string>6.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>SMFancyTextViewController</string>
+ <string>UIResponder</string>
+ <string>{{239, 654}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">7</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">SMFancyTextViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/SMFancyTextViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">SMFancyText.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">77</string>
+ <nil key="IBCocoaTouchSimulationTargetRuntimeIdentifier"/>
+ </data>
+</archive>
8 SMFancyText_Prefix.pch
View
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'SMFancyText' target in the 'SMFancyText' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
17 main.m
View
@@ -0,0 +1,17 @@
+//
+// main.m
+// SMFancyText
+//
+// Created by Simon Maddox on 15/09/2010.
+// Copyright 2010 Sensible Duck Ltd. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}
BIN  safari.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.