This file contains 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 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) |
This file contains 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
#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 |
I hereby claim:
- I am alexandreraulin on github.
- I am alexandreraulin (https://keybase.io/alexandreraulin) on keybase.
- I have a public key ASC4LZZCbJCw-aWLVaYHWC0uOdM_FY9oNoorJ9QeEB8bego
To claim this, I am signing this object:
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
This file contains 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 UIView { | |
class func loadFromNibNamed(nibNamed: String, bundle : NSBundle? = nil) -> UIView? { | |
return UINib( | |
nibName: nibNamed, | |
bundle: bundle | |
).instantiateWithOwner(nil, options: nil)[0] as? UIView | |
} | |
} |
This file contains 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 <UIKit/UIKit.h> | |
@interface UIView (RoundedCorners) | |
- (void)setRoundedCorners:(UIRectCorner)corners radius:(CGSize)size; | |
@end |
This file contains 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/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() { |
This file contains 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
# 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 |