This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Khanh Le Do on 16/4/16. | |
// Copyright © 2016 kloc. All rights reserved. | |
// | |
import Foundation | |
import UIKit | |
public class LayoutConstraintBuilder { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Khanh Le Do on 12/3/16. | |
// Copyright © 2016 estasy. All rights reserved. | |
// | |
import Foundation | |
import UIKit | |
import XCGLogger | |
public class LogUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static func heightNeeded(text:String, font:UIFont, width:CGFloat) -> CGFloat{ | |
let label:UILabel = UILabel(frame: CGRectMake(0, 0, width, CGFloat.max)) | |
label.numberOfLines = 0 | |
label.lineBreakMode = NSLineBreakMode.ByWordWrapping | |
label.font = font | |
label.text = text | |
label.sizeToFit() | |
return label.frame.height | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Khanh Le Do on 16/4/16. | |
// Copyright © 2016 kloc. All rights reserved. | |
// | |
import Foundation | |
import UIKit | |
public class LayoutConstraintBuilder { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Khanh Le Do on 6/4/16. | |
// Copyright © 2016 kloc. All rights reserved. | |
// | |
import Foundation | |
/// Original shuffle methods given on Stackoverflow: | |
/// http://stackoverflow.com/questions/24026510/how-do-i-shuffle-an-array-in-swift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Khanh Le Do on 16/4/16. | |
// Copyright © 2016 kloc. All rights reserved. | |
// | |
import Foundation | |
/// Attribution to: | |
/// http://stackoverflow.com/questions/28633703/insertion-order-dictionary-like-javas-linkedhashmap-in-swift |