Skip to content

Commit

Permalink
Can't see the text of two lines. Close #31
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Radchenko committed Oct 30, 2014
1 parent 1cf317f commit e8318e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/SCLAlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ class SCLAlertView: UIViewController {
// View text
viewText.editable = false
viewText.textAlignment = .Center
viewText.textContainerInset = UIEdgeInsetsZero
viewText.textContainer.lineFragmentPadding = 0;
viewText.font = UIFont(name: kDefaultFont, size:14)
// Colours
contentView.backgroundColor = UIColorFromRGB(0xFFFFFF)
Expand Down Expand Up @@ -332,7 +334,7 @@ class SCLAlertView: UIViewController {
let attr = [NSFontAttributeName:viewText.font]
let sz = CGSize(width: kWindowWidth - 24, height:90)
let r = str.boundingRectWithSize(sz, options: NSStringDrawingOptions.UsesLineFragmentOrigin, attributes:attr, context:nil)
let ht = ceil(r.size.height) + 10
let ht = ceil(r.size.height)
if ht < kTextHeight {
kWindowHeight -= (kTextHeight - ht)
kTextHeight = ht
Expand Down

0 comments on commit e8318e3

Please sign in to comment.