A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
# This script is based on Jacob Van Order's answer on apple dev forums https://devforums.apple.com/message/971277 | |
# See also http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start | |
# To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework | |
# Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate | |
###################### | |
# Options |
#!/bin/sh | |
# Script for managing build and version numbers using git and agvtool. | |
# Change log: | |
# v1.0 18-Jul-11 First public release. | |
# v1.1 29-Sep-12 Launch git, agvtool via xcrun. | |
version() { |
#import <UIKit/UIKit.h> | |
@interface UIView (RoundedCorners) | |
- (void)setRoundedCorners:(UIRectCorner)corners radius:(CGSize)size; | |
@end |
extension UIView { | |
class func loadFromNibNamed(nibNamed: String, bundle : NSBundle? = nil) -> UIView? { | |
return UINib( | |
nibName: nibNamed, | |
bundle: bundle | |
).instantiateWithOwner(nil, options: nil)[0] as? UIView | |
} | |
} |
FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives in a window above your application. From this toolbar, you can view and modify nearly every piece of state in your running application.
Installation via Cocoapods
pod 'FLEX', '~> 1.1'
Setup in project: AppDelegate.m
I hereby claim:
To claim this, I am signing this object:
#https://gist.github.com/Chandler/fb7a070f52883849de35 SEE HERE | |
# MIT License | |
# Copyright (c) 2016 Chandler Abraham | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
extension UITapGestureRecognizer { | |
func didTapAttributedTextInLabel(label: UILabel, inRange targetRange: NSRange) -> Bool { | |
// Create instances of NSLayoutManager, NSTextContainer and NSTextStorage | |
let layoutManager = NSLayoutManager() | |
let textContainer = NSTextContainer(size: CGSize.zero) | |
let textStorage = NSTextStorage(attributedString: label.attributedText!) | |
// Configure layoutManager and textStorage | |
layoutManager.addTextContainer(textContainer) |