mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-15 02:29:17 +08:00
Merge pull request #96 from katsuyoshi/callback_setup_controller
add callback after created controller.
This commit is contained in:
@@ -213,10 +213,15 @@ module Bacon
|
||||
attr_accessor :controller
|
||||
|
||||
def controller
|
||||
@controller ||= if @options[:id]
|
||||
storyboard.instantiateViewControllerWithIdentifier(@options[:id])
|
||||
else
|
||||
@controller_class.alloc.init
|
||||
@controller ||= begin
|
||||
c = nil
|
||||
if @options[:id]
|
||||
c = storyboard.instantiateViewControllerWithIdentifier(@options[:id])
|
||||
else
|
||||
c = @controller_class.alloc.init
|
||||
end
|
||||
send(@options[:after_created], c) if @options[:after_created]
|
||||
c
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user