Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//
// 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
You can’t perform that action at this time.