lib/sugarcube/sugarcube_cleanup.rb in sugarcube-1.3.7 vs lib/sugarcube/sugarcube_cleanup.rb in sugarcube-1.3.8

- old
+ new

@@ -1,49 +1,16 @@ class UIViewController def sugarcube_cleanup - super - self.view.sugarcube_cleanup - self.childViewControllers.each do |subctlr| - subctlr.sugarcube_cleanup - end + NSLog("Good news! The sugarcube_cleanup method is no longer needed.") end end -class UIResponder - - class << self - - def sugarcube_cleanup(&block) - @sugarcube_cleanup ||= [] - return @sugarcube_cleanup unless block - @sugarcube_cleanup << block - return nil - end - - end - - def sugarcube_cleanup - self.class.ancestors.each do |klass| - next unless klass.respond_to?(:sugarcube_cleanup) - klass.sugarcube_cleanup.each do |block| - self.instance_eval(&block) - end - break if klass == UIResponder - end - end - -end - - class UIView def sugarcube_cleanup - super - self.subviews.each do |subview| - subview.sugarcube_cleanup - end + NSLog("Good news! The sugarcube_cleanup method is no longer needed.") end end