Skip to content

Instantly share code, notes, and snippets.

View bragisig's full-sized avatar

Bragi Fannar Sigurðsson bragisig

  • VALITOR
  • Iceland
View GitHub Profile
@qnoid
qnoid / gist:6140282
Created August 2, 2013 14:29
Animate an UIBarButtonItem that has been assigned a UIButton as its customview. The UIButton uses an image that is mirrored on the X axis hence appear as if it's rotating.
-(IBAction)tap:(id)sender
{
UIBarButtonItem *refresh = self.navigationItem.rightBarButtonItem;
CALayer *layer = ((UIButton*)refresh.customView).imageView.layer;
CABasicAnimation *rotate = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotate.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear];
rotate.fromValue = @(0);
rotate.toValue = @(2 * M_PI);
#!/usr/bin/env js
function isnet93_to_wgs84(xx, yy) {
this.x = xx;
this.y = yy;
this.a = 6378137.0;
this.f = 1/298.257222101;
this.lat1 = 64.25;