 		
 		var captionLabel = self.captionLabelWithPlainText(nil, orAttributedText:attributedText, fromFrame:frame)
 		
-		var backgroundView = UIView(frame: captionLabel.frame)
+		var captionFrame = CGRectMake(0, frame.size.height - captionLabel.frame.size.height - 2 * captionPadding,
+			captionLabel.frame.size.width + 2 * captionPadding, captionLabel.frame.size.height + 2 * captionPadding)
+		
+		self.frame = captionFrame
+		
+		var backgroundView = UIView(frame: self.bounds)
 		backgroundView.backgroundColor = UIColor.blackColor()
 		backgroundView.alpha = 0.6
 		
-		var captionFrame = CGRectMake(0, frame.size.height-captionLabel.frame.size.height,
-			captionLabel.frame.size.width, captionLabel.frame.size.height)
-		
 		self.backgroundColor = UIColor.clearColor()
-		self.autoresizingMask = .FlexibleTopMargin | .FlexibleWidth;
-			
+		self.autoresizingMask = .FlexibleTopMargin | .FlexibleWidth
+		
 		self.addSubview(backgroundView)
 		self.addSubview(captionLabel)
 	}

	}
}

class LBPhotoCaptionView: UIView
{
	init(frame: CGRect, plainText:NSString)

			captionSize.height = frame.size.height/3
		}
		
		var captionLabel = UILabel(frame: CGRectMake(captionPadding, captionPadding,
			frame.size.width - 2 * captionPadding, captionSize.height))
		captionLabel.backgroundColor = UIColor.clearColor()
		captionLabel.font = captionFont
		captionLabel.numberOfLines = 0;
