Skip to content

Instantly share code, notes, and snippets.

View kos9kus's full-sized avatar
😶‍🌫️
Always coding

Kos kos9kus

😶‍🌫️
Always coding
View GitHub Profile
@kos9kus
kos9kus / CreatePredicateWIthRadius.m
Last active June 28, 2016 21:57
Create a predicate for LCLocation to determine a distance with specific radius
KKPosition KKPositionMake(double latitude, double longitude, double r) {
KKPosition p;
p.latitude = latitude;
p.longitude = longitude;
p.radius = r;
return p;
}
#define deg2rad(degrees) ((M_PI * degrees)/180)
@kos9kus
kos9kus / KKTypeDPI.h
Last active June 29, 2016 22:50
New types for UIDevice as extension to determine current type of device in Swift
typedef NS_ENUM(NSUInteger, KKOperationImageType) {
KKOperationImageTypeMDPI,
KKOperationImageTypeHDPI,
KKOperationImageTypeXHDPI,
KKOperationImageTypeXXHDPI
};