23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'motion-prime/screens/extensions/_indicators_mixin.rb', line 23
def show_progress_indicator(text = nil, options = {})
options[:styles] ||= []
options[:styles] << :base_progress_indicator
options[:styles] << :"#{self.class_name_without_kvo.underscore.gsub('_screen', '')}_indicator"
options[:details_label_text] = text
if @progress_indicator_view.nil?
options[:add_to_view] ||= self.view
@progress_indicator_view = self.progress_hud(options).view
else
self.update_options_for(@progress_indicator_view, options.except(:add_to_view))
@progress_indicator_view.show options.has_key?(:animated) ? options[:animatetd] : true
end
end
|