3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/app_delegate.rb', line 3
def application application, didFinishLaunchingWithOptions: launchOptions
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@controller = UIViewController.alloc.initWithNibName(nil, bundle:nil)
@window.rootViewController = @controller
@window.makeKeyAndVisible
@label = UILabel.alloc.initWithFrame [ [10,10], [300,100] ]
@label.setAccessibilityLabel 'location'
@label.setText '...'
@controller.view.addSubview @label
Locomotion.watch purpose: 'Testing...' do |location|
@label.setText "#{location.latitude},#{location.longitude}"
end
true
end
|