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
protocol UIViewLoading {} | |
extension UIView : UIViewLoading {} | |
extension UIViewLoading where Self : UIView { | |
static func loadFromNib() -> Self { | |
let nibName = "\(self)".characters.split{$0 == "."}.map(String.init).last! | |
let bundle = NSBundle(forClass: self) | |
let nib = UINib(nibName: nibName, bundle: bundle) | |
return nib.instantiateWithOwner(self, options: nil).first as! Self |
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
#!/bin/bash | |
set -e | |
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd "${THIS_SCRIPT_DIR}/.." | |
# Check if there's something uncommitted (don't release if there are files | |
# not yet committed) | |
set +e |
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
// | |
// UIView+Nib.swift | |
// Pods | |
// | |
// Created by Sapozhnik Ivan on 29.06.16. | |
// | |
// | |
import Foundation |
NewerOlder