Skip to content

Instantly share code, notes, and snippets.

View paulomendes's full-sized avatar

Paulo Mendes paulomendes

View GitHub Profile
@milancermak
milancermak / gist:e0b959a5195d28133a1f
Created December 4, 2014 11:58
Drawing a dashed line on GoogleMaps for iOS
- (void)drawDashedLineOnMapBetweenOrigin:(CLLocation *)originLocation destination:(CLLocation *)destinationLocation {
[self.mapView clear];
CGFloat distance = [originLocation distanceFromLocation:destinationLocation];
if (distance < kMinimalDistance) return;
// works for segmentLength 22 at zoom level 16; to have different length,
// calculate the new lengthFactor as 1/(24^2 * newLength)
CGFloat lengthFactor = 2.7093020352450285e-09;
CGFloat zoomFactor = pow(2, self.mapView.camera.zoom + 8);
@maxchuquimia
maxchuquimia / KIFUITestActor+Helper.h
Last active January 13, 2019 21:55
KIF Checking for an Accessibility Element. http://www.wtfpl.net/
//
// KIFUITestActor+Helper.h
//
// Created by Max Chuquimia on 10/04/2014.
//
//
#import "KIFUITestActor.h"
@interface KIFUITestActor (Helper)