Coder Social home page Coder Social logo

vpeschenkov / letteravatarkit Goto Github PK

View Code? Open in Web Editor NEW
218.0 5.0 25.0 706 KB

๐Ÿ“ฒ Use this extension ๐Ÿงฉ to create letter-based avatars or placeholders ๐ŸŽญ to be utilized within your app

License: MIT License

Swift 84.54% Objective-C 10.49% Ruby 2.33% Shell 0.47% C 2.17%
swift swift-framework letter-avatar ios gmail-avatar objective-c jazzy initials-avatar initials avatar

letteravatarkit's People

Contributors

matteocrippa avatar vpeschenkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

letteravatarkit's Issues

Initials Generation

Currently if the name you pass to use for the initials has more than one space, there will be more than two characters in the abbreviated initials view. Can you modify the code to look for both the first and last word and then capture the first letters of those instead?

Rounded corners

In the Readme, you show the letter avatars as square or rounded but I am having difficulty doing this. Can you share the code for this please?

Compilation issue Xcode 8 - swift 3.0

HI ,

I am getting compilation issue on this line.

if let letter = firstComponent.first  

the issue says
"'String' has no member 'first'"

can you add this extension to make it work ? on swift 3.0 as well.

extension String{
    
    
    func first()->String{
        
        
        return String(self.characters.prefix(1))
        
    }    
}

Can I add Transparent Background Color to View

Description

Describe your issue here.

Requirements ( Add Transparent Color to BackgroundColor Array )

  • When I set the block Color with alpha (0,0,0,0.12) but it is showing black color instead of transparent color

Hexcode -- 1F000000 is Used

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

LetterAvatarKit version:

iOS version: 13.3.1

Feature - Single Letter Support

HI,

Is it possible to add support for single letter via Configuration ? Like I only want to use Single Letter as Initials like google does.

Swift 4.2

Any plans to migrate to Xcode 10 and Swift 4.2?

Single letter

First of all: Thanks for the convenient library!

I ran into an issue where my app crashed with a username that consists out of one letter only. Looking into your code, I saw that this is probably due to the fact that the single parameter in LetterAvatarBuilderConfiguration is always false. I changed it into:

open var singleLetter: Bool {
        if let name = username, name.count == 1  {
            return true
        } else {
            return false
        }
    }

in my local repo, but I can't push them to your repo to create a pull request. Would you mind giving me permission or changing this yourself?

Crash: Fatal error: cannot increment beyond endIndex

let endIndex = component.index(component.startIndex, offsetBy: 2)

If single Letter is passed as false but the string is a single char, this line fails due to out of bounds exception.

I think it would be safer to avoid this crash inside the framework by checking the size of the string before subscripting.

If the string is only 1 letter lenght, then the singleLetter configuration could be ignored

Draw circle image

Hi,

First of all, thank you very much for this library. Great job :)
I was wondering how I can draw a circular image instead of a rectangular one?

Nawras

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.