This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show view | |
@informView = InformView.new.tap do |v| | |
v.message = "loading...") | |
navigationController.view.addSubview(v) | |
end | |
@informView.showWithAnimation(true) | |
# hide view | |
@informView.hideWithAnimation(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
class InformView < UIView | |
WIDTH = 280 | |
HEIGHT = 100 | |
# singleton | |
def self.instance | |
# warning at super in "init" method --version 1.29 > unknown: warning: passing a block to an Objective-C method - will be ignored | |
# Dispatch.once { @instance ||= new } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
class SampleAPI | |
def initialize(content, &block) | |
@content = content | |
fetch do | |
block.call() if block | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem 'bubble-wrap', :require => 'bubble-wrap/all' | |
gem 'bubble-wrap', :git => 'https://github.com/amazedkoumei/BubbleWrap.git', :submodules => true, :require => 'bubble-wrap/all' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p NSJSONReadingMutableContainers # => 1 | |
p NSJSONReadingMutableLeaves # => 2 | |
p NSJSONReadingAllowFragments # => 4 | |
opts = NSJSONReadingMutableContainers & NSJSONReadingMutableLeaves & NSJSONReadingAllowFragments | |
p opts # => 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/rubymotion/octofeed $rake retina=true --trace | |
rake aborted! | |
uninitialized constant BubbleWrap | |
/Users/amazedkoumei/.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing' | |
/Users/amazedkoumei/rubymotion/octofeed/bundle/ruby/1.8/gems/bubble-wrap-1.1.4/lib/bubble-wrap/loader.rb:7 | |
/Users/amazedkoumei/rubymotion/octofeed/bundle/ruby/1.8/gems/bubble-wrap-1.1.4/lib/bubble-wrap/all.rb:1:in `require' | |
/Users/amazedkoumei/rubymotion/octofeed/bundle/ruby/1.8/gems/bubble-wrap-1.1.4/lib/bubble-wrap/all.rb:1 | |
/Users/amazedkoumei/.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' | |
/Users/amazedkoumei/.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' | |
/Users/amazedkoumei/.rbenv/versions/1.8.7-p358/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# diffから"+++ or Binary files"を抽出 | |
git diff master develop | grep "+++\|Binary files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
j bubble | |
sudo gem build bubble-wrap.gemspec | |
sudo gem install bubble-wrap-1.1.4.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="UTF-8" /> | |
<!-- deviceの横幅に合わせる --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rake device --trace | |
** Invoke device (first_time) | |
** Invoke archive (first_time) | |
** Invoke build:device (first_time) | |
** Execute build:device | |
** Execute archive | |
** Execute device | |
XCODE_DIR="/Applications/Xcode.app/Contents/Developer" /Library/RubyMotion/bin/deploy -d "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" "./build/iPhoneOS-6.0-Development/clipTo.ipa" | |
log: subscribing to device notification | |
log: found usb mobile device XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |