Module: Motion::Loadingview

Defined in:
lib/motion-loadingview/version.rb,
lib/motion-loadingview/loading_view.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#remove_loading_viewObject



14
15
16
# File 'lib/motion-loadingview/loading_view.rb', line 14

def remove_loading_view
  @loadingView.removeFromSuperview
end

#set_loading_view(view = self.view) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/motion-loadingview/loading_view.rb', line 3

def set_loading_view(view = self.view)
  @loadingView = UIView.alloc.initWithFrame(view.bounds)
  @loadingView.setBackgroundColor(UIColor.scrollViewTexturedBackgroundColor)
  @loadingView.setAlpha(1.0)
  @indicator = UIActivityIndicatorView.alloc.initWithActivityIndicatorStyle(UIActivityIndicatorViewStyleWhiteLarge)
  view.addSubview(@loadingView)
  @loadingView.addSubview(@indicator)
  @indicator.setFrame(CGRectMake((320/2)-20, (480/2)-90, 40, 40))
  @indicator.startAnimating
end