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
extension UITableView { | |
/// Variable-height UITableView tableHeaderView with autolayout | |
/// | |
/// Source: https://gist.github.com/marcoarment/1105553afba6b4900c10 | |
func layoutTableHeaderView() { | |
guard let headerView = self.tableHeaderView else { return } | |
headerView.translatesAutoresizingMaskIntoConstraints = false |
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
import Foundation | |
import UIKit | |
// Usage Examples | |
let system12 = Font(.system, size: .standard(.h5)).instance | |
let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance | |
let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance | |
let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance | |
struct Font { |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
def show_usage(msg = nil) | |
puts "#{msg}\n\n" if msg | |
puts "Usage:\n\t#{$PROGRAM_NAME} [storyboard_file]" | |
exit(0) | |
end |
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
- (BOOL)canBecomeFirstResponder | |
{ | |
return YES; | |
} | |
-(NSArray *)keyCommands | |
{ | |
return @[ | |
[UIKeyCommand keyCommandWithInput:@"1" modifierFlags:0 action:@selector(debugCommand1)], | |
[UIKeyCommand keyCommandWithInput:@"2" modifierFlags:0 action:@selector(debugCommand2)] |
NewerOlder