Class: RubyMotionQuery::App

Inherits:
Object show all
Defined in:
lib/project/ruby_motion_query/app.rb

Class Method Summary collapse

Class Method Details

.current_screen(root_view_controller = nil) ⇒ Object



5
6
7
# File 'lib/project/ruby_motion_query/app.rb', line 5

def current_screen(root_view_controller = nil)
  current_view_controller root_view_controller
end

.data(*args) ⇒ Object

Do not alias this



9
10
11
# File 'lib/project/ruby_motion_query/app.rb', line 9

def data(*args) # Do not alias this
  CDQ.cdq(*args)
end

.reset_image_cache!Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/project/ruby_motion_query/app.rb', line 13

def reset_image_cache!
  if !!defined?(SDWebImageManager)
    image_cache = SDImageCache.sharedImageCache
    image_cache.clearMemory
    if image_cache.respond_to?(:clearDisk)
      # Support for SDWebImage v3.x
      image_cache.clearDisk
    else
      # Support for SDWebImage v4.x
      image_cache.deleteOldFiles
    end
  else
    puts "\n[RedPotion ERROR]  tried to reset image cache without SDWebImage cocoapod. Please add this to your Rakefile: \n\napp.pods do\n  pod \"SDWebImage\"\nend\n"
  end
end