Skip to content

Swift (iOS) - Sometimes you need to crop to center or make a round UIImageView. This library will help you to do it.

Notifications You must be signed in to change notification settings

jjlabella/CropRoundedImageView

Repository files navigation

CropRoundedImageView

Swift (iOS) - Sometimes you need to crop to center or make a round UIImageView. This library will help you to do it.

In this example we are going to create a @IBDesignable and we will use @IBInspectable variables to setup our new component.

##Preview

##Installation The only thing you need to do is just drag and drop the file "CropRoundedImageView.swift" to you project.

##How to use it First of all set the custom class to "CropRoundedImageView" for each UIImageView you want to rounded or center crop.

You have two options:

  1. Setup the component in Xcode

If you are creating your component in compile time, and the UIImageView extis, you can use this controls in your Xcode to setup your UIImageView

  1. Do it in your code

On the other hand, if your UIImageView is not created when you press "Play", you can setup your control usign the public function inside the class.

  • makeRound() -> To round your UIImageView
  • cropImage() -> To center crop your UIImageView
  • load() -> -> To round and crop your UIImageView

##Support Any questions, please fell free to send me your comments: [email protected]

About

Swift (iOS) - Sometimes you need to crop to center or make a round UIImageView. This library will help you to do it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages