Latest 0.1.0
License MIT
Platforms ios 8.3, requires ARC


Excellent placeholder for your image views. Tell your designer what to do using the storyboard.


There must be times that you are putting an image view into your app of some purpose but you don’t have the image. Not long after you start digging through the internet for image, you forget the dimension, or even the purpose of the image. This TemplateImageView is the perfect solution to this annoyance.

It does not only tell you the dimensions (of your choice) but it also contains a descriptive text field for you to illustrate the purpose of image being put there. You can your designer can communicate using the storyboard!




This project works on Xcode 6.3 Swift 1.2 beta 2, but not previous releases of Xcode.


  • Cocoapods: Add pod 'TemplateImageView' to your Podfile and pod install.
  • Manual: Download Classes/TemplateImageView.swift and plug it into your code. Create a new UIView and change its class into TemplateImageView.


It provides many @IBInspectable properties for you to change in the storyboard of Xcode 6+ on the fly.

  • image: The image of the image view. That’s the most important thing an image view does. If the image is not nil, all the template size markers and texts will be hidden.
  • show1x, show2x, show3x: whether to show size mark @1x, @2x, or @3x.
  • simpleSizeMark: Bool: true to just show the dimension at @1x regardless of the three options above; otherwise show as the three options above specified.
  • descriptiveText: String: The descriptive text at the center of template view.
  • descriptiveTextSize: CGFloat: The size of the descriptive text.
  • descriptiveTextColor: UIColor: The color of the descriptive text.
  • sizeMarkTextColor: UIColor: The text color of the size mark, like [email protected] [email protected].
  • sizeMarkColor: UIColor: The size mark color.
  • sizeMarkIndentation: CGFloat: The vertical indentation of the horizontal size mark, or the horizontal indentation of the vertical size mark.
  • sizeMarkHeight: CGFloat: The height of size marks.
  • sizeMarkTopPadding: CGFloat: The padding between size mark text and the size mark bar.

Latest podspec

    "name": "TemplateImageView",
    "version": "0.1.0",
    "summary": "An excellent placeholder of image view with customizable size marks and a descriptive text.",
    "description": "                   Template image view provides placeholding overlay on a image view. Sometimes you may not have the suitable image, so this view will be the perfect placeholder at that situation.nn                   It displays size marks and a descriptive text with custom font / color / size. Able to change specs through Xcode 6+ interface builder without running the app.nn",
    "homepage": "",
    "screenshots": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "DJBen": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "8.3"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "source_files": "TemplateImageView/Classes/*.*",
    "requires_arc": true

Pin It on Pinterest

Share This