Search code examples
iossnapchat

How does Snapchat show text over image


I am working on an iOS app where the users can add description/text when uploading images like Snapchat.

Do they render images and add the text to image so that it becomes part of the image itself or is it shown as a UILabel over the image?

For the 2nd option the text would have to be sent separately to server.

P.S. Just having an argument with Server side programmer and I'm suggesting the 2nd option.


Solution

  • If we check /ph/upload in Snapchat API (last updated 23-12-2013) we can see that you can upload either a photo or a video.

    Of course, this is not the latest version (although this is the last documentation I could find) but I am assumming nothing has changed in that regard.

    That means the text is inserted to the photo in the mobile client app, not on the server.

    In my opinion, you shouldn't base any decisions about your API architecture on Snapchat because it's unlikely you have the same use cases. In general:

    1. Sending data separately is more flexible and makes client implementation simpler.
    2. Rendering data on the client is better for user experience (everything is faster and the user can see the final result) and also it saves a lot of server resources (the more users you have the more this will be visible).