{"id":17129734,"url":"https://github.com/lm2343635/uiimageview-extension","last_synced_at":"2026-03-16T06:08:02.927Z","repository":{"id":56924926,"uuid":"78720751","full_name":"lm2343635/UIImageView-Extension","owner":"lm2343635","description":"A simple UIImageView category which can set border radius, shadow, circle and rotation for image view.","archived":false,"fork":false,"pushed_at":"2018-09-13T09:15:47.000Z","size":5174,"stargazers_count":36,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T10:34:03.872Z","etag":null,"topics":["interface-builder","uiimageview-category","uiimageview-extension"],"latest_commit_sha":null,"homepage":"https://cocoapods.org/pods/UIImageView+Extension","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lm2343635.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-12T07:38:35.000Z","updated_at":"2023-01-12T08:12:34.000Z","dependencies_parsed_at":"2022-08-20T22:50:24.987Z","dependency_job_id":null,"html_url":"https://github.com/lm2343635/UIImageView-Extension","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lm2343635%2FUIImageView-Extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lm2343635%2FUIImageView-Extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lm2343635%2FUIImageView-Extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lm2343635%2FUIImageView-Extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lm2343635","download_url":"https://codeload.github.com/lm2343635/UIImageView-Extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248676628,"owners_count":21143937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interface-builder","uiimageview-category","uiimageview-extension"],"created_at":"2024-10-14T19:10:30.631Z","updated_at":"2026-03-16T06:08:02.883Z","avatar_url":"https://github.com/lm2343635.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"UIImageView+Extension ![Supported Platforms](https://img.shields.io/cocoapods/p/UIImageView+Extension.svg) [![Latest pod release](https://img.shields.io/cocoapods/v/UIImageView+Extension.svg)](https://cocoapods.org/pods/UIImageView+Extension) [![Build Status](https://travis-ci.org/lm2343635/UIImageView-Extension.svg?branch=master)](https://travis-ci.org/lm2343635/UIImageView-Extension) [![License](https://img.shields.io/cocoapods/l/UIImageView+Extension.svg)](https://github.com/lm2343635/UIImageView-Extension/LICENSE)\n===\nA simple UIImageView category with some extension functions.\n\n# Features\n- Support Interface Builder.\n- Set border radius for image view.\n- Set shadow for image view.\n- Rotate image view.\n- Set image view to circle.\n\n# Installation\n\n### CocoaPods\nInstalling UIImageView+Extension by [CocoaPods](http://cocoapods.org/). \n\n```ruby\npod 'UIImageView+Extension', '~\u003e 0.2'\n```\n### Manual Way\n\n- Add `UIImageView+Extension.h` and `UIImageView+Extension.m` to your project.\n- `#import \"UIImageView+Extension.h\"` where you want to use the control.\n- These files require **ARC**.\n\n# Usage\n\n- If you just want to set features in Interface Builder, just do it in Interface Builder, you need not to do anything.\n\n![Interface Builder Guide](https://raw.githubusercontent.com/lm2343635/UIImageView-Extension/master/screenshot/InterfaceBuilderGuide.png)\n\n- If you want to control your image view in your program, you should import the category header: `#import \"UIImageView+Extension.h\"` to your `.h` or `.m` file.\n\n# API Document\n### Corner Radius\n\nSetting corner radius is supported in Interface Builder.\n\n```objective-c\n// Set corner radius.\n_imageView.cornerRadius = 10;\n```\n\nThe method `setImageCornerRadius:`(version 0.2.1 and before) is not recommended to use in this version now.\n\n### Shadow\n\nSetting shadow is supported in Interface Builder.\n\nYou can also set them in your code. Shadow color and radius are necessary to create a shadow. Shadow will be shown after you set shadow color and radius.\n\n```objective-c\n// Change shadow color, offset and radius.\n_imageView.shadowColor = [UIColor redColor];\n_imageView.shadowRadius = 1.0;\n_imageView.shadowXOffset = 1.0;\n_imageView.shadowYOffset = 1.0;\n```\n\n### Rotate\nYou can rotate a image view infinitely by the method `startRotate:withClockwise:`, the first parameter is rotation time per 1 round, the second parameter decides this rotation is clockwise or anticlockwise. \n\n```objective-c\n// Init a shadow with color, offset and raduis.\n[_imageView startRotate:2 withClockwise:NO];\n\n// Change shadow color, offset and radius.\n[_imageView stopRotate];\n```\n### Blur\nSetting blur is supported in Interface Builder. You can set blur style including\n\n- **extraLight** (UIBlurEffectStyleExtraLight)\n- **light** (UIBlurEffectStyleLight)\n- **dark** (UIBlurEffectStyleDark)\n- **regular** (UIBlurEffectStyleRegular)\n- **prominent** (UIBlurEffectStyleProminent)\n\nand blur alpha(0 \u003c alpha \u003c= 1) directly in the Interface Builder. The default style is regular.\n\n```objective-c\n// Change blur style, here use the enum UIBlurEffectStyle.\n[_imageView changeBlurEffectStyle:UIBlurEffectStyleExtraLight];\n\n// Change blur alpha.\n_imageView.blurAlpha = 0.5;\n```\n\n### Circle\n\nSetting image view to circle is supported in Interface Builder.\n**You must insure your image view is a square(width = height).** We recommend you add `Aspect Ratio` constraint for your image view.\n\n```objective-c\n_imageView.circle = YES;\n```\n\n- Tip: If you set corner radius and circle at same time, corner radius will be invalid.\n\n# Demo App\nA demo project contained in this repository shows how to use UIImageView+Extension from a storyboard.\n\n![Demo App](https://raw.githubusercontent.com/lm2343635/UIImageView-Extension/master/screenshot/DemoApp.png)\n\nAnother demo app: I used this extension in my app Rate Assistant, you can download this app from App Store: https://itunes.apple.com/app/murate/id1139573801 to see this demo, it is an open source app, you can get the source code from https://github.com/MuShare/Rate-iOS\n\n# Change log\n\n* version 0.2.6\n  * Set userInteractionEnabled in the shadow container to make image view clickale.\n  * Give a tip when the image view has no parent view. \n\n* version 0.2.5.1\n  * Fix some issues.\n\n* version 0.2.5\n  * Fix the issue that UIImageView+Extension will affect the display of split line in UISegmentedControl.\n\n* version 0.2.4\n  * Shadow container needs not init manually, so we removed setImageCornerRadius and setShadowWithColor method from interface.\n  * Fix the issue that image view(circle attribute ON) is not cirle with auto layout.\n\n* version 0.2.3\n  * Blur image view. \n  * Fix the constraint bug for shadow. This version fixed the bug that position and size of a shadow will be wrong if image view has some constraint in the old version.\n\n* version 0.2.2\n  * Set image view to circle.\n  * Set corner radius by setter method directly. \n\n* version 0.2.1\n  * Rotate image view infinitely.\n\n* version 0.2.0\n  * Support Interface Builder.\n  * Support changing shadow style.\n\n* version 0.1.0\n  * Set corner radius and shadow for UIImageView.\n\n# License\n\nUIImageView+Extension is licensed under the terms of the MIT License. Please see the [LICENSE](LICENSE) file for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flm2343635%2Fuiimageview-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flm2343635%2Fuiimageview-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flm2343635%2Fuiimageview-extension/lists"}