mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-05-12 19:28:26 +08:00
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