mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-02 09:31:37 +08:00
16 lines
290 B
Ruby
16 lines
290 B
Ruby
class RunloopYield
|
|
def initialize(&b)
|
|
@b = b
|
|
run
|
|
end
|
|
|
|
def run
|
|
performSelectorOnMainThread(:'test_start', withObject:nil, waitUntilDone:false)
|
|
NSRunLoop.currentRunLoop.runUntilDate(NSDate.dateWithTimeIntervalSinceNow(0.1))
|
|
end
|
|
|
|
def test_start
|
|
@b.call
|
|
end
|
|
end
|