diff --git a/MVMCore/MVMCore/ActionHandling/ActionShareHandler.swift b/MVMCore/MVMCore/ActionHandling/ActionShareHandler.swift index cfaff2c..39d5738 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionShareHandler.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionShareHandler.swift @@ -22,6 +22,11 @@ open class ActionShareHandler: MVMCoreActionHandlerProtocol { try await withCheckedThrowingContinuation { continuation in let controller = UIActivityViewController(activityItems: activityItems, applicationActivities: nil) controller.popoverPresentationController?.sourceView = NavigationHandler.shared().viewControllerToPresentOn?.view + var originPoint: CGPoint = .zero + if let view = NavigationHandler.shared().viewControllerToPresentOn?.view { + originPoint = CGPoint(x: view.frame.midX, y: view.frame.maxY) + } + controller.popoverPresentationController?.sourceRect.origin = originPoint controller.completionWithItemsHandler = {(activityType: UIActivity.ActivityType?, completed: Bool, returnedItems: [Any]?, error: Error?) in if completed { // Activity was completed, considered finished. diff --git a/MVMCore/MVMCore/OtherHandlers/MVMCoreLoggingHandler.swift b/MVMCore/MVMCore/OtherHandlers/MVMCoreLoggingHandler.swift index afe5fc1..7ddadbb 100644 --- a/MVMCore/MVMCore/OtherHandlers/MVMCoreLoggingHandler.swift +++ b/MVMCore/MVMCore/OtherHandlers/MVMCoreLoggingHandler.swift @@ -24,10 +24,10 @@ import Foundation MVMCoreObject.sharedInstance()?.loggingDelegate?.logLoadFinished(loadObject, loadedViewController: loadedViewController as? MVMCoreViewControllerProtocol, error: error) } - func recordEvent(_ name: String, attributes: [String : Any]?) {} + open func recordEvent(_ name: String, attributes: [String : Any]?) {} // MARK: - logging delegate - @objc public func handleDebugMessage(_ message: String?) { + @objc open func handleDebugMessage(_ message: String?) { #if LOGGING guard let message = message else { return } self.print(with: message) @@ -36,6 +36,6 @@ import Foundation @objc(addErrorToLog:) open func addError(toLog errorObject: MVMCoreErrorObject) { - MVMCoreObject.sharedInstance()?.loggingDelegate?.addError(toLog: errorObject) + // Subclass to handle. } }