README.md in bubble-wrap-1.0.0.pre.2 vs README.md in bubble-wrap-1.0.0
- old
+ new
@@ -205,11 +205,13 @@
``` ruby
class ExampleViewController < UIViewController
include BW::KVO
def viewDidLoad
- @label = "Initial state"
-
+ @label = UILabel.alloc.initWithFrame [[20,20],[280,44]]
+ @label.text = ""
+ view.addSubview @label
+
observe(@label, "text") do |old_value, new_value|
puts "Hello from viewDidLoad!"
end
end