Latest 0.1
Homepage https://github.com/kirayamato1989/KYExpressionInputView
License MIT
Platforms ios 7.0, requires ARC
Authors

Inilization

KYExpressionInputView *inputView = [[KYExpressionInputView alloc] init];

Add emoji expression input with expressionItems

// get the emoji strings
NSString *emojiPath = [kExpressionBundle pathForResource:@"ISEmojiList" ofType:@"plist"];

NSArray *array = [NSArray arrayWithContentsOfFile:emojiPath]; 

for (NSString *text in array) {

      KYExpressionItem *item = [KYExpressionItem itemWithEmoji:text];

      [emojiItems addObject:item];

}

[inputView addToolbarItemWithImage:nil title:@"表情" items:emojiItems row:KYUIntegerOrientationMake(4, 5) column:KYUIntegerOrientationMake(8, 14) itemSize:KYSizeOrientationMake(CGSizeMake(36, 36), CGSizeMake(36, 36)) itemSpacing:KYFloatOrientationMake(6, 8)]
;

emoji input image

Add a image expression input with expressionItems

NSMutableArray *items = [NSMutableArray array];

for (int i = 0; i < 100; i++) {

      NSString *path = [kExpressionBundle pathForResource:[NSString stringWithFormat:@"%i",arc4random_uniform(5)+1]        ofType:nil];

      NSData *data = [NSData dataWithContentsOfFile:path];

      KYExpressionItem *item = [KYExpressionItem itemWithData:data url:nil];

      [items addObject:item];
}

NSString *iconPath = [kExpressionBundle pathForResource:@"icon" ofType:@"jpg"];

// set the toolBar item' image and title etc.
[inputView addToolbarItemWithImage:[UIImage imageWithContentsOfFile:iconPath] title:nil items:items row:KYUIntegerOrientationMake(2, 3) column:KYUIntegerOrientationMake(6, 10) itemSize:KYSizeOrientationMake(CGSizeMake(50, 50), CGSizeMake(44, 44)) itemSpacing:KYFloatOrientationMake(15, 15)];

image

Latest podspec

{
    "name": "KYExpressionInputView",
    "version": "0.1",
    "summary": "an inputView for easily custom expression",
    "homepage": "https://github.com/kirayamato1989/KYExpressionInputView",
    "license": "MIT",
    "authors": {
        "Kira Yamato": "https://github.com/kirayamato1989"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/kirayamato1989/KYExpressionInputView.git",
        "tag": "0.1"
    },
    "source_files": "KYExpressionInputView/*.{h,m}",
    "resources": "KYExpressionInputView/*.bundle",
    "requires_arc": true
}

Pin It on Pinterest

Share This