Make images with name initials like Gmail in Swift programmatically for iOS

后端 未结 8 2226
孤城傲影
孤城傲影 2021-02-05 18:03

I need to display a profile pic of every user corresponding to his name in a UITableView. Until the image is downloaded I need to show an image with his name\'s first alphabet l

8条回答
  •  借酒劲吻你
    2021-02-05 18:34

    This is perfect for the UIImageView: https://github.com/bachonk/UIImageView-Letters. Basically, it creates a UIImage with, at the center, the initial letter of the first and last word of the input. The background color can be random or assigned.

    Here's an example of what this category can do:

    [EDIT]

    You may also want to check this out: https://github.com/bofiaza/IPImage

提交回复
热议问题