Skip to content

Instantly share code, notes, and snippets.

View jordanbrown's full-sized avatar

Jordan Brown jordanbrown

View GitHub Profile
- (void)viewDidLoad {
[super viewDidLoad];
// This view exists purely so that iOS 7 stops messing with our PSPDFScrollView.
// If this doesn't exist and the parent didn't set `automaticallyAdjustsScrollViewInsets` to NO, then the view doesn't stay fixed anymore.
// This is better than enforcing disabling this property on the parent - since we don't even know who our parent is.
UIView *fakeView = [[UIView alloc] initWithFrame:CGRectZero];
fakeView.backgroundColor = UIColor.clearColor;
fakeView.userInteractionEnabled = NO;
[self.view addSubview:fakeView];
@jordanbrown
jordanbrown / UIAppearence
Created June 28, 2014 18:42
UIAppearance proxies
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/UIKit.framework/Headers
grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'
@jordanbrown
jordanbrown / Hide Terminal.app
Last active December 24, 2015 17:09
Hide Terminal.app
How to Do It
1. Run sudo nano /Applications/Utilities/Terminal.app/Contents/Info.plist
2. Add these two lines right after opening <dict> tag:
<key>LSUIElement</key>
<true />
3. Save and close the file by pressing (control key) ^O Enter ^X
4. Quit Terminal and launch it again