Skip to content

Live rendering of UIImageView properties in Interface Builder

License

Notifications You must be signed in to change notification settings

tejas-ardeshna/TJProfileImage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TJProfileImage

Live rendering of componet’s properties in Interface Builder

Swift Version License CocoaPods Compatible
Platform PRs Welcome

Image

Features

  • Dashed border
  • Solid border
  • Round corner
  • Circle image

Requirements

  • iOS 9.0+
  • Xcode 8.3

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate TJProfileImage into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'TJProfileImage'
end

Then, run the following command:

$ pod install

Manually

  1. Download and drop TJProfileImage.swift in your project.
  2. Congratulations!

Implementation

Just set class of your UIImageView to TJProfileImage and let the magic happen.

import TJProfileImage
@IBOutlet var imgView: TJProfileImage!

imgView.dashedBorder  = true           // shows dashed border instead of plain
imgView.isCircular    = true           // makes image view in round shape
imgView.cornerRadious = 5              // you can set custom corner radious also. IF you set isCircular then it will neglate this corner radious
imgView.borderColor   = UIColor.green  // border color
imgView.borderWidth   = 2              // border width

Contribute

We would love you for the contribution to TJProfileImage, check the LICENSE file for more info.

Meta

Tejas Ardeshna – @tejas_ardeshnatejasardeshna@gmail.com

Distributed under the MIT license. See LICENSE for more information.