Created
August 24, 2017 04:55
-
-
Save edwardinubuntu/a879d36a2081f90e0274ecb0bbe538a7 to your computer and use it in GitHub Desktop.
This file contains 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
// | |
// View+Extension.swift | |
// carce-ios | |
// | |
// Created by Edward Chiang on 12/14/15. | |
// Copyright © 2015 Soleil Studio. All rights reserved. | |
// | |
import UIKit | |
extension UIView { | |
class func loadFromNibNamed(nibNamed: String, bundle : Bundle? = nil) -> UIView? { | |
return UINib(nibName: nibNamed, bundle: bundle).instantiate(withOwner: nil, options: nil)[0] as? UIView | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment