Skip to content

Instantly share code, notes, and snippets.

View martinhering's full-sized avatar
💭
Committing...

Martin Hering martinhering

💭
Committing...
  • Vemedio
View GitHub Profile
@martinhering
martinhering / gist:068edb5908fe04c677e6
Last active August 29, 2015 14:04
Managing scrollview.contentInset adjustment manually
- (void) setScrollView:(UIScrollView*)scrollView contentInsets:(UIEdgeInsets)edgeInsets byAdjustingForStandardBars:(BOOL)adjustStandardBars
{
if (adjustStandardBars)
{
UINavigationController* navController = self.navigationController;
if (navController)
{
CGRect navBarFrame = self.navigationController.navigationBar.frame;
edgeInsets.top += CGRectGetMinY(navBarFrame); // statusbar
@martinhering
martinhering / osx-tethering-check
Last active December 25, 2015 04:49
OS X Tethering Check
#import <CoreWLAN/CoreWLAN.h>
#import <SystemConfiguration/SystemConfiguration.h>
extern CFStringRef _SCNetworkInterfaceGetIOPath(SCNetworkInterfaceRef interface);
@interface CWNetwork (Voodoo)
- (NSDictionary*) scanRecord;
@end