@@ -102,20 +102,19 @@ class ReadiumReaderView: NSObject, FlutterPlatformView, EPUBNavigatorDelegate {
102102 channel. setMethodCallHandler ( onMethodCall)
103103 readiumViewController. delegate = self
104104
105- let child : UIView = readiumViewController. view // Must specify type `UIView`, or we end up with an `UIView?` instead…
105+ let child : UIView = readiumViewController. view
106106 let view = _view
107-
108107 view. addSubview ( readiumViewController. view)
109108
110109 child. translatesAutoresizingMaskIntoConstraints = false
111110
112111 NSLayoutConstraint . activate (
113- [
114- child. leadingAnchor. constraint ( equalTo: view. leadingAnchor) ,
115- child. trailingAnchor. constraint ( equalTo: view. trailingAnchor) ,
116- child. topAnchor. constraint ( equalTo: view. topAnchor) ,
117- child. bottomAnchor. constraint ( equalTo: view. bottomAnchor)
118- ]
112+ [
113+ child. leadingAnchor. constraint ( equalTo: view. leadingAnchor) ,
114+ child. trailingAnchor. constraint ( equalTo: view. trailingAnchor) ,
115+ child. topAnchor. constraint ( equalTo: view. topAnchor) ,
116+ child. bottomAnchor. constraint ( equalTo: view. bottomAnchor)
117+ ]
119118 )
120119
121120 setCurrentReadiumReaderView ( self )
@@ -240,7 +239,7 @@ class ReadiumReaderView: NSObject, FlutterPlatformView, EPUBNavigatorDelegate {
240239
241240 if shouldGo {
242241 print ( TAG, " goToLocator: Go to \( locator. href) " )
243- let goToSuccees = await readiumViewController. go ( to: locator, options: NavigatorGoOptions ( animated: false ) )
242+ let goToSuccees = await readiumViewController. go ( to: locator, options: NavigatorGoOptions ( animated: animated ) )
244243 if ( goToSuccees && shouldScroll) {
245244 await self . scrollTo ( locations: locations, toStart: false )
246245 self . emitOnPageChanged ( )
0 commit comments