mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-15 02:29:17 +08:00
4f71e2ac34060efcb77ea9d7517af5e7ab001755
Sometimes view controller has a data.
The controller was set as a root view controller to the window before called "before" block.
But a data is not set at this point.
The view controller access to nil, and crash sometime even if I set a data in "before" block.
After created controller it will call the specified callback method if you set :after_created option
# Example
describe MyViewController do
tests MyViewController, after_created: :after_created_controller
def after_created_controller controller
# you can set data to the controller here
controller.my_data = "foo"
end
.
.
end
= RubyMotion
RubyMotion is a commercial toolchain for iOS and OS X development using the
Ruby programming language.
This repository contains the parts of the RubyMotion product that are
opensource. It does not contain the full product, which can be purchased at
http://www.rubymotion.com.
== Contents
The +lib+ directory contains the project Rakefile library and the build system.
These files are installed as +/Library/RubyMotion/lib+.
In order to use the GitHub version of these files in your RubyMotion project,
you can modify the project Rakefile like this.
$:.unshift(ENV['RUBYMOTION_LIB'] || '/Library/RubyMotion/lib')
You must also set +motiondir+, so the +data+ and +bin+ directories can be found.
Motion::Project::App.setup do |app|
app.name = '...'
app.motiondir = '/Library/RubyMotion'
# ...
end
Then, simply set the RUBYMOTION_LIB environment variable when using +rake+.
$ cd MyProject
$ RUBYMOTION_LIB=~/src/RubyMotion/lib rake
== Contributions
Please use the GitHub pull-request mechanism to submit contributions.
== License
Copyright (c) 2012, HipByte SPRL and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Description
Languages
Ruby
98.5%
HTML
1.3%
Python
0.2%