CoreLocationを使ってGPSやらなにやらで現在位置を特定する。
まずプロジェクトにCoreLocation.frameworkを追加する。
ここではサンプルとしてDemoViewControllerというものがあるとして、そこで位置取得を行う。
| // ==UserScript== | |
| // @name Twitter with Favotter | |
| // @namespace http://gist.github.com/607622 | |
| // @include http://twitter.com/*/status/* | |
| // ==/UserScript== | |
| (function () { | |
| // Favotter URL | |
| var favotter = "http://favotter.net/"; | |
| // CSS |
| - (void)viewDidLoad | |
| { | |
| [super viewDidLoad]; | |
| // 空の配列を用意 | |
| self.items = [NSArray array]; | |
| [self getJSON]; | |
| } | |