Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| // | |
| // SSScrollView.h | |
| // | |
| /* | |
| Get a delegate callback when the scroll view scrolls. | |
| */ | |
| #import <Cocoa/Cocoa.h> |
| // | |
| // NSObject+BlockObservation.h | |
| // Version 1.0 | |
| // | |
| // Andy Matuschak | |
| // andy@andymatuschak.org | |
| // Public domain because I love you. Let me know how you use it. | |
| // | |
| #import <Cocoa/Cocoa.h> |
| // | |
| // UIDeviceHardware.h | |
| // | |
| // Used to determine EXACT version of device software is running on. | |
| #import <Foundation/Foundation.h> | |
| @interface UIDeviceHardware : NSObject | |
| - (NSString *) platform; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/usr/bin/env ruby | |
| ########################################################################### | |
| # Script to be called as an Xcode 4 behaviour which will attempt to | |
| # uncrustify all source files in the open project. | |
| # | |
| # (c) Copyright 2012 David Wagner. | |
| # | |
| # Complain/commend: http://noiseandheat.com/ | |
| # | |
| #*************************************************************************# |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| // In toolbarWillAddItem: create a new NSMenu | |
| // set the delegate and add the menu as part of a NSMenuItem as menuFormRepresentation | |
| - (void)menuNeedsUpdate:(NSMenu *)menu | |
| { | |
| // clear out in case we can no longer provide this service | |
| [menu removeAllItems]; | |
| NSURL *fileURL = [self.document fileURL]; |
| #import <QuartzCore/QuartzCore.h> | |
| @interface ArrowLayer : CALayer | |
| @property (nonatomic) CGFloat thickness; | |
| @property (nonatomic) CGFloat startRadians; | |
| @property (nonatomic) CGFloat lengthRadians; | |
| @property (nonatomic) CGFloat headLengthRadians; | |
| @property (nonatomic, strong) UIColor *fillColor; |
Is AppKit causing you frustration? Instead of just complaining about it, lets try to make it better by compiling a list of specific problems with AppKit. Leave a comment below, and I'll include it in the list.
##NSView##
NSView does not have the ability to set an affine transform (rdar://15608609)NSTextField) do not respond properly when layer-backed. Take NSButton as an example. When not layer-backed, it will animate properly using the animator proxy. When layer-backed, using the animator proxy breaks focus rings (they jump to destination immediately). Currently, directly manipulating the layer of a cell-based control is not supported (and will lead to a broken interface), but is much needed. (rdar://15608822)##NSViewController##
NSViewController could be more useful. It has -loadView but no other lifecycle methods. (rdar://15608948)| // http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html has a nice breakdown of the syntax--it helps to think of the ^ as similar to a pointer dereference symbol * | |
| // block typedef: | |
| typedef void(^Block)(); | |
| typedef void(^ConditionalBlock)(BOOL); | |
| typedef NSString*(^BlockThatReturnsString)(); | |
| typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL); | |
| // block property with typedef: |