Skip to content

Instantly share code, notes, and snippets.

View christ776's full-sized avatar

Christian De Martino christ776

View GitHub Profile
protocol TableViewFooter:class {
var footerActivityIndicator:UIActivityIndicatorView! {get set}
var tableView:UITableView! {get set}
func setupTableViewFooter()
}
extension TableViewFooter {
func setupTableViewFooter() {
let replaced = String(challengeName.characters.flatMap {
$0 == "#" ? nil : $0
})
protocol NavigationBarTitleViewMixin {
func showAppLogoInTitleView()
}
extension NavigationBarTitleViewMixin where Self:UIViewController {
func showAppLogoInTitleView() {
let logoView = UIImageView(image: UIImage(named:"navbar_brand"))
self.navigationController!.navigationBar.setTitleVerticalPositionAdjustment(-6.0, forBarMetrics: .Default)