Latest 0.1.0
Homepage https://github.com/DJBen/TemplateImageView
License MIT
Platforms ios 8.3, requires ARC
Authors

TeplateImageView

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

Inspiration

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!

Screenshot

Usage

Note

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

Installation

  • 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.

Properties

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": "https://github.com/DJBen/TemplateImageView",
    "screenshots": "https://raw.githubusercontent.com/DJBen/TemplateImageView/master/screenshot-storyboard.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DJBen": "[email protected]"
    },
    "social_media_url": "https://www.facebook.com/HelloDJBen",
    "platforms": {
        "ios": "8.3"
    },
    "source": {
        "git": "https://github.com/DJBen/TemplateImageView.git",
        "tag": "0.1.0"
    },
    "source_files": "TemplateImageView/Classes/*.*",
    "requires_arc": true
}

Pin It on Pinterest

Share This