This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) |
| /** | |
| * The following preprocessor macros can be used to adopt the new nullability annotations and generics | |
| * features available in Xcode 7, while maintaining backwards compatibility with earlier versions of | |
| * Xcode that do not support these features. | |
| */ | |
| #if __has_feature(nullability) | |
| # define __ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN | |
| # define __ASSUME_NONNULL_END NS_ASSUME_NONNULL_END | |
| # define __NULLABLE nullable |
| // | |
| // NSAttributedString+format.m | |
| // Chatterbox | |
| // | |
| // Created by Brent Royal-Gordon on 2/7/14. | |
| // Copyright (c) 2014 Architechies. All rights reserved. | |
| // | |
| #import "NSAttributedString+format.h" |
| NSUInteger PSPDFHashFromCGRect(CGRect rect) { | |
| return (*(NSUInteger *)&rect.origin.x << 10 ^ *(NSUInteger *)&rect.origin.y) + (*(NSUInteger *)&rect.size.width << 10 ^ *(NSUInteger *)&rect.size.height); | |
| } |
| @implementation UITextView (RSExtras) | |
| static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
| /*[s length] is assumed to be 0 or 1. s may be nil. | |
| Totally not a strict check.*/ | |
| if (s == nil || [s length] < 1) | |
| return NO; |