lib/ios/sugarcube-factories/uiactionsheet.rb in sugarcube-2.1.5 vs lib/ios/sugarcube-factories/uiactionsheet.rb in sugarcube-2.2.0
- old
+ new
@@ -117,10 +117,10 @@
from = UIApplication.sharedApplication.windows[0]
end
case from
when CGRect
- view = UIApplication.sharedApplication.windows[0]
+ view = options.fetch(:view, UIApplication.sharedApplication.windows[0])
alert.showFromRect(from, inView: view, animated: true)
when UIBarButtonItem
alert.showFromBarButtonItem(from, animated: true)
when UIToolbar
alert.showFromToolbar(from)