Skip to content

Instantly share code, notes, and snippets.

View lapfelix's full-sized avatar
🇨🇦
¯\_(ツ)_/¯

Felix Lapalme lapfelix

🇨🇦
¯\_(ツ)_/¯
View GitHub Profile
@import GoogleMaps;
@protocol LabelsEntityProviderLabeling <NSObject>
@property (assign, nonatomic) bool labelingEnabled;
@end
- (void)forceRemoveLabelsFromMap:(GMSMapView *)mapView {
GMSUISettings *settings = mapView.settings;
@lapfelix
lapfelix / gist:e4dd1c5b39bd507d5b58
Created January 29, 2016 03:45
List all iOS private frameworks
NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:@"/System/Library/PrivateFrameworks/"];
for (NSString * objectName in enumerator) {
if(![objectName containsString:@"/"]) {
NSLog(@"%@",objectName);
}
}
@lapfelix
lapfelix / FLPRelativeDateFormatter.swift
Last active October 27, 2015 05:21
A light NSDateFormatter subclass that's easy to use and understand. Though it probably won't work well with localization....
import UIKit
class FLPRelativeDateFormatter: NSDateFormatter {
static let sharedFormatter = FLPRelativeDateFormatter()
override func stringFromDate(date: NSDate) -> String {
let interval = date.timeIntervalSinceNow
if (interval < 61){
return "Just now"
}else if(interval < 3600){