Class: SampleViewController

Inherits:
UIViewController
  • Object
show all
Defined in:
app/sample_view_controller.rb

Instance Method Summary collapse

Instance Method Details

#viewWillAppear(animated) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/sample_view_controller.rb', line 3

def viewWillAppear(animated)
  
  self.view.backgroundColor = UIColor.whiteColor
  
  button = Now.button("Test") do |button|
    button.width 100
    button.height 50
  end.click do
    Now.alert "Hi"
  end
  
  self.view.now.add button
  
  
  @x = Now.drawing do
    set_fill_color UIColor.redColor
    fill_rect CGRectMake 0, 0, 10, 10      
  end
  
  @x.size("10x10")
  
  self.view.now.add @x
  
end