Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend support for styling and configuration options for iOS #10

Merged
merged 7 commits into from
Apr 10, 2019

Conversation

radazzouz
Copy link
Contributor

@radazzouz radazzouz commented Mar 25, 2019

Details

This PR adds the ability to set some basic PSPDFConfiguration option when presenting the document. It also adds the ability to set the appearance mode.

recording

Since we want the have a consistent Dart API, we decided to use the shared naming for the configuration options defined here: https://github.com/PSPDFKit/pspdfkit-flutter/blob/master/lib/configuration_options.dart

Also, for example on iOS, the appearance mode is not set in PSPDFConfiguration, we set it to the PSPDFViewController's appearance mode manager, like so: https://pspdfkit.com/guides/ios/current/customizing-the-interface/appearance-mode-manager/?#appearance-mode

Acceptance Criteria

  • Adds the ability to set some basic PSPDFConfiguration option when presenting the document.
  • Adds the ability to set the appearance mode

@radazzouz radazzouz added enhancement New feature or request iOS labels Mar 25, 2019
@radazzouz radazzouz self-assigned this Mar 25, 2019
@radazzouz radazzouz force-pushed the rad/ios-styling-configuration-support branch from 44be034 to 577548c Compare March 30, 2019 14:20
@radazzouz radazzouz added the READY TO REVIEW Pull request ready to review label Mar 30, 2019
@radazzouz radazzouz requested review from simoarpe and steviki March 30, 2019 15:01
Copy link
Contributor

@steviki steviki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just some questions and nitpicks.

ios/Classes/PspdfkitPlugin.m Show resolved Hide resolved
ios/Classes/PspdfkitPlugin.m Outdated Show resolved Hide resolved
ios/Classes/PspdfkitPlugin.m Outdated Show resolved Hide resolved
steviki and others added 2 commits April 1, 2019 07:39
Co-Authored-By: radazzouz <radazzouz@users.noreply.github.com>
* Remove the `PSPDF` prefix from private methods.
* Create helpers for enum configurations.
@radazzouz radazzouz requested a review from steviki April 2, 2019 11:40
Copy link
Contributor

@simoarpe simoarpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@radazzouz radazzouz merged commit e694660 into master Apr 10, 2019
@radazzouz radazzouz deleted the rad/ios-styling-configuration-support branch April 10, 2019 18:36
radazzouz pushed a commit that referenced this pull request Jan 10, 2020
Having spaces in the assert name caused the following exception on both iOS and Android:

```
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iOS READY TO REVIEW Pull request ready to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants