Permalink
Browse files

Cleaned up readme, tests, and example

  • Loading branch information...
1 parent 7fe0f02 commit a8734c219d972436ebb53f5033eca9904a889b26 @dongle dongle committed Jan 30, 2013
@@ -7,6 +7,7 @@
//
#import "DIYAppDelegate.h"
+#import "DIYViewController.h"
@implementation DIYAppDelegate
@@ -16,6 +17,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
+
+ DIYViewController *vc = [[DIYViewController alloc] init];
+ self.window.rootViewController = vc;
+
return YES;
}
@@ -28,7 +28,17 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- (void)viewDidLoad
{
[super viewDidLoad];
- // Do any additional setup after loading the view.
+
+ NSString *emojiString = @"This comment has an emoji :mushroom:";
+
+ // Make UILabel
+ UILabel *emojiLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 220, 30)];
+ emojiLabel.center = self.view.center;
+ emojiLabel.text = [emojiString emojizedString];
+ emojiLabel.font = [UIFont systemFontOfSize:12.0f];
+ emojiLabel.textAlignment = NSTextAlignmentCenter;
+
+ [self.view addSubview:emojiLabel];
}
@end
@@ -14,7 +14,7 @@ @implementation NSStringEmojizeTests
- (void)testCheatcodes
{
- NSString *emojiString = @"This comment has a smiley :mushroom:";
+ NSString *emojiString = @"This comment has an emoji :mushroom:";
STAssertTrue([[emojiString emojizedString] rangeOfString:@"\U0001F344"].location != NSNotFound, nil);
}
View
@@ -10,7 +10,8 @@ In order to use NSString+Emojize, you'll want to add the entirety of the `NSStri
```
```objective-c
-
+NSString *emojiString = @"This comment has an emoji :mushroom:";
+NSLog(@"%@", [emojiString emojizedString]);
```
---

0 comments on commit a8734c2

Please sign in to comment.