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
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { | |
context.duration = 4.f; | |
context.allowsImplicitAnimation = YES; | |
[view.layer addAnimation:CATransition.animation forKey:@"contents"]; | |
view.layer.contents = someImage; | |
} completionHandler:nil]; |
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 <Cocoa/Cocoa.h> | |
@interface LBHView : NSView | |
/// This property controls whether the view can indirectly control its | |
/// backing layer's properties, specifically the following: | |
/// `affineTransform` | |
/// `anchorPoint` | |
/// | |
/// These properties cannot be modified on the layer during the time that |
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 <Foundation/Foundation.h> | |
@interface NSString (IBNMetrics) | |
- (CGSize)ibn_sizeConstrainedToSize:(CGSize)size font:(NSFont *)font; | |
- (CGSize)ibn_sizeWithFont:(NSFont *)font; | |
@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 | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until script has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
OlderNewer