Help with Custom Keyboard & stickers

Discussion in 'iOS Programming' started by Reach9, Dec 21, 2015.

  1. Reach9, Dec 21, 2015
    Last edited: Dec 22, 2015

    Reach9 macrumors 68020

    Reach9

    Joined:
    Aug 17, 2010
    Location:
    In America
    #1
    I'm learning iOS dev on my own and i'm trying to make a custom keyboard of stickers in Objective-C, for messaging. I'm going to put UIImageViews in a UICollectionView and when the user taps on a cell, I'll post the UIImage (the sticker) in that tapped cell, into the conversation.

    My plan is to take a sheet of all the stickers and make empty cells but associate those cells with the stickers and it'll be posted when the user taps on them. I believe this method would be less data reliant than updating every cell.

    I've already made a normal custom keyboard but..

    I'm not sure exactly how to architect the collectionview of stickers in the keyboard, and I was wondering if I could get some guidance here. Thanks!
     
  2. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #2
    I may be wrong but I don't believe what you're trying to do is possible in iOS. A custom keyboard is still a keyboard that inputs normal UTF8 characters including emoji. I don't think you'll be able to actually insert images into standard text fields.
     
  3. Reach9, Dec 22, 2015
    Last edited: Dec 23, 2015

    Reach9 thread starter macrumors 68020

    Reach9

    Joined:
    Aug 17, 2010
    Location:
    In America
    #3
    Thanks for the reply AxoNeuron.
    Upon further researching I realized you're right. It's not possible to post Images from the keyboard and I figured out that these "stickers keyboards" are just UIViews.

    I was wondering if someone could help me translate the following Swift code to Objective-C:

    var proxy = textDocumentProxy as UITextDocumentProxy

    When I typed in UITextDocumentProxy on Xcode in Objective-C it did not see it as a class, why not? I get the following error "Use of undeclared identifier 'UITextDocumentProxy'"

    Any advice would be great, thanks.
     

Share This Page