Skip to content

Emoji Picker View Controller for Mac OS X Mavericks and up

License

Notifications You must be signed in to change notification settings

betaphi/PI_EmojiPicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PI_EmojiPicker

Simple NSView or NSViewController based picker for Emoji.

I took the wonderful work of AGEmojiKeyboard (https://github.com/ayushgoel/iOS-emoji-keyboard) as a base to create an OS X version.

Its extremely simple and worth a couple hours of work. Its useful if you want to allow a user to enter Emoji without having to use the "special keyboard" in the edit menu.

An example would be like Messages/iChat which has a smiley face picker next to the text entry.

Image

Installation

Copy the files in Emoji Picker into your project and look at the PI Emoji Picker folder to see how the classes are used for more detail.

Usage

The example file uses a simple NSViewController subclass to show the Emoji picker within an NSPopover:

@interface PIEmojiViewController : NSViewController
@property (nonatomic, weak) id<PIEmojiViewDelegate> delegate;

@end

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
	self = [super initWithNibName:@"EmojiView" bundle:nil];
	if (self) {
	}
	return self;
}

-(void)setDelegate:(id<PIEmojiViewDelegate>)delegate
{
	PIEmojiKeyboardView* emojiKeyboardView = (PIEmojiKeyboardView*)self.view;
	emojiKeyboardView.delegate = delegate;
}

Implement two delegate methods:

-(void)emojiKeyDidUseEmoji:(NSString *)emoji
{
}

-(void)emojiKeyBoardViewDidPressBackSpace
{
}

Requirements

Written and tested only on 10.9 Mavericks, with Xcode 5.11, and using ARC

Author

PI_EmojiPicker is authored by Alex Kac

AGEmojiKeyboard is authored by Ayush Goel, [email protected]

License

PI_EmojiPicker is available under the MIT license. See the LICENSE file for more info.

About

Emoji Picker View Controller for Mac OS X Mavericks and up

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%