Class: A
- Inherits:
-
UIViewController
- Object
- UIViewController
- A
- Defined in:
- app/a.rb
Instance Method Summary collapse
Instance Method Details
#viewDidLoad ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/a.rb', line 2 def viewDidLoad view = UIScrollView.alloc.init view.backgroundColor = UIColor.whiteColor m = Map.new(a:10, b:20, c:{d:30} ) view.contentSize = [320, m.count*200] i = 0 m.each_pair do |k,v| label = UILabel.alloc.initWithFrame( [[10, 10+i*40], [320, 40]] ) label.text = "#{k}:#{v}" self.view.addSubview(label) i += 1 end end |