motion/mail/mail.rb in bubble-wrap-1.4.0 vs motion/mail/mail.rb in bubble-wrap-1.5.0.rc1
- old
+ new
@@ -24,14 +24,15 @@
# end
def compose(options={}, &callback)
@delegate = options[:delegate] || App.window.rootViewController
@callback = callback
+ @callback.weak! if @callback && BubbleWrap.use_weak_callbacks?
@mail_controller = create_mail_controller(options)
@mailer_is_animated = options[:animated] == false ? false : true
- @delegate.presentModalViewController(@mail_controller, animated: @mailer_is_animated)
+ @delegate.presentViewController(@mail_controller, animated: @mailer_is_animated, completion: options[:completion])
end
def create_mail_controller(options={})
mail_controller = MFMailComposeViewController.alloc.init