Skip to content

Instantly share code, notes, and snippets.

source 'https://rubygems.org'
gem 'rake'
# Add your dependencies here:
gem 'motion-my_env'
 Build ./build/iPhoneSimulator-6.1-Development
 Compile /var/folders/nl/vdz7nrv12zj44kcjg_vmpr1r0000gn/T/motion_env20130830-12748-1c625u6.rb
2013-08-30 16:21:51.931 ruby[12824:f0f] No such file or directory -- /var/folders/nl/vdz7nrv12zj44kcjg_vmpr1r0000gn/T/motion_env20130830-12748-1c625u6.rb (LoadError)
2013-08-30 16:21:51.932 ruby[12824:f0f] *** Terminating app due to uncaught exception 'LoadError', reason: 'No such file or directory -- /var/folders/nl/vdz7nrv12zj44kcjg_vmpr1r0000gn/T/motion_env20130830-12748-1c625u6.rb (LoadError)
'
*** Call stack at first throw:
(
0 CoreFoundation 0x93cdbe8b __raiseError + 219
1 libobjc.A.dylib 0x9716852e objc_exception_throw + 230
2 ruby 0x0013a419 rb_rescue2 + 793

シェルTIPS 20min

コンピュータの方がうまくできることに人間を使うな。
-- Tom Duff

キーバインド

Emacs の基本操作とおなじ。

シェルTIPS 20min
===========
コンピュータの方がうまくできることに人間を使うな。
-- Tom Duff
キーバインド
----------
Emacs の基本操作とおなじ。
# -*- coding: utf-8 -*-
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
controller = MainViewController.alloc.init
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(controller)
@window.makeKeyAndVisible
true
end
end
# -*- coding: utf-8 -*-
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
controller = MainViewController.alloc.init
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(controller)
@window.makeKeyAndVisible
true
end
end
# -*- coding: utf-8 -*-
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
controller = MainViewController.alloc.init
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(controller)
@window.makeKeyAndVisible
true
end
end
# -*- coding: utf-8 -*-
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
controller = MainViewController.alloc.init
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(controller)
@window.makeKeyAndVisible
true
end
end
http://colinta.com/thoughts/editable_uitableview_like_a_boss.html
このページにある例 (http://cdn.bloghackers.net/images/20130720_150337.png) を見ても、
NSNotificationCenter.defaultCenter.addObserver のセレクタで指定したメソッドは引数なし
になってますが、iOS SDK の NSNotificationCenter のドキュメントには
> The method specified by notificationSelector must have one and only one
> argument (an instance of NSNotification).
と書いてます。
# -*- coding: utf-8 -*-
class MainViewController < UIViewController
def viewDidLoad
super
puts NSLocale.preferredLanguages.objectAtIndex(0) # => ja
puts NSLocale.currentLocale.localeIdentifier # => ja_JP
bundle = NSBundle.bundleWithPath(NSBundle.mainBundle.resourcePath.stringByAppendingPathComponent("NSDateTimeAgo.bundle"))
puts bundle.localizedStringForKey("%d seconds ago", value:nil, table:'NSDateTimeAgo') # => en.lproj の値になってしまう