Juanpe / SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to add rounded corners to skeleton views

virtualrapha opened this issue · comments

Hi,

in the README, all screenshots show skeleton views with sharp corners. Is it possible to provide a corder radius so that the grey views have rounded corners?

This featured will be awesome!

Hi @raphaklr and @manuel21, actually the round corners are allowed. If you view has corner the skeleton will draw with corner too.

For example, with this code:

@IBOutlet weak var avatarImage: UIImageView! {
    didSet {
        avatarImage.layer.cornerRadius = avatarImage.frame.width/2
        avatarImage.layer.masksToBounds = true
    }
}

The result is:
screen shot 2017-11-22 at 08 51 21

@Juanpe thanks for the answer. But is it possible to have rounded corners in the skeleton view, while the actual views have sharp edges? I'm looking for something like this:

bildschirmfoto 2017-11-22 um 09 07 20

Mm...not, today it's not possible. I'm going to add this feature in the backlog, ok?
Thanks!

Closed this issue, corner radius are available since version 1.2.1