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

Instance no longer returned on present(on:) in 1.4.1 #87

Closed
dhritzkiv opened this issue Feb 11, 2022 · 9 comments
Closed

Instance no longer returned on present(on:) in 1.4.1 #87

dhritzkiv opened this issue Feb 11, 2022 · 9 comments

Comments

@dhritzkiv
Copy link

Describe the bug
In 1.3.2 it was possible to retrieve the instance of the view controller after calling present:

let countryController = CountryPickerWithSectionViewController.presentController(on: self) { ... }

^ that's from the README

Now, the call returns ()

If this is no longer supported, 1.4.1 should have been 2.0.0, as that's a breaking change

@Sharkesm
Copy link
Collaborator

@dhritzkiv Good point that you raised.

@SURYAKANTSHARMA Could we proceed with updating the README based on the recent changes that you made.

@SURYAKANTSHARMA
Copy link
Owner

SURYAKANTSHARMA commented Feb 11, 2022

@dhritzkiv read me already updated please check https://github.com/SURYAKANTSHARMA/CountryPicker#readme cc @Sharkesm
between why you need instance at first place ?

there is other function for that if you need manual presentation on your navigation etc

 CountryPickerWithSectionViewController.presentController(on: self, configuration: { countryController in
            // You can still capture here in you need to but not recommended 
        }) { [weak self] country in
            
          
        }

@SURYAKANTSHARMA
Copy link
Owner

SURYAKANTSHARMA commented Feb 11, 2022

@Sharkesm should we close this or do you want me to upgrade the version ?

@dhritzkiv
Copy link
Author

In 1.3.2 I was doing this:

let countryController = CountryPickerWithSectionViewController.presentController(on: self) { [weak self] (country: Country) in
    // code
}

countryController.title = "" // custom title

countryController.detailFont = UIFont.systemFont(ofSize: 17)
countryController.detailColor = UIColor.systemGray
countryController.labelFont = UIFont.systemFont(ofSize: 17)
countryController.labelColor = UIColor.systemGray

countryController.flagStyle = .corner

I'm unable to apply these in the configuration block

@Sharkesm
Copy link
Collaborator

Sharkesm commented Feb 12, 2022

@dhritzkiv I think you can still apply the configuration of the controller as instructed on the README file.

@SURYAKANTSHARMA For that case since there's code-breaking would be best to update the versioning to avoid any confusion and cross-check the styling section of the README file as well.

@dhritzkiv
Copy link
Author

It doesn't look to be the case. More than just that API changed:

image

@SURYAKANTSHARMA
Copy link
Owner

use countryController. configuration.detailFont will update major version.

@Sharkesm
Copy link
Collaborator

Sharkesm commented Feb 14, 2022

@dhritzkiv Updated the README file on the styling section. Please confirm as to whether the styling configuration is exposed for the current version or else we may proceed to close this thread.

cc/ @SURYAKANTSHARMA

@SURYAKANTSHARMA
Copy link
Owner

I have not delete live version as per this. but had updated new version will reflect soon 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Countrypicker
  
Awaiting triage
Development

No branches or pull requests

3 participants