 //
-//  CL.swift
-//  Pisma
+//  PVShowMessage.swift
 //
 //  Created by Patrik Vaberer on 7/20/15.
 //  Copyright (c) 2015 Patrik Vaberer. All rights reserved.

        pinTo.layoutIfNeeded()
        
        if frame.width > 320 {
            
            width = NSLayoutConstraint(item: self, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 300)
            width?.isActive = true
            pinTo.layoutIfNeeded()
        }
        
        if frame.height > UIScreen.main.bounds.height {
            
            height = NSLayoutConstraint(item: self, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: UIScreen.main.bounds.height - 30)
            height?.isActive = true
            pinTo.layoutIfNeeded()

import Foundation
import UIKit

public protocol PVShowMessageDelegate {
    func didTapToMessage(_ identifier: AnyObject?)
}

typealias CL = PVShowMessage
open class PVShowMessage: NSObject {
    
    fileprivate struct Static {
        static var onceToken: Int = 0
    }
    
    public enum InitialPosition {
        case bottom
        case top
    }
    open var delegate: PVShowMessageDelegate? = nil
    open static var cBackgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.8)
    open static var cTextColor = UIColor.white
    open static var cCornerRadius: CGFloat = 5
