Added rmq.app.windows that returns the windows array

This commit is contained in:
Todd Werth
2014-12-02 14:11:09 -08:00
parent fe11c2336c
commit d471c7a5f4
2 changed files with 11 additions and 1 deletions

View File

@@ -21,8 +21,14 @@ module RubyMotionQuery
end
end
def windows
if shared_application = UIApplication.sharedApplication
shared_application.windows
end
end
# @return [UIApplicationDelegate]
def delegate
def delegate
UIApplication.sharedApplication.delegate
end

View File

@@ -16,6 +16,10 @@ describe 'app' do
@app.window.should == UIApplication.sharedApplication.keyWindow
end
it 'should return app windows' do
@app.windows.should == UIApplication.sharedApplication.windows
end
it 'should return app delegate' do
@app.delegate.should == UIApplication.sharedApplication.delegate
end