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

Updated Xcode to 10.0 , WhatsNewViewController.Theme now contains error "Missing argument backgroundColor" #5

Closed
stshelton opened this issue Sep 19, 2018 · 3 comments
Labels
question Further information is requested

Comments

@stshelton
Copy link

stshelton commented Sep 19, 2018

Just updated to Xcode 10.0 and recieved this error "missing argument for paramater 'backgroundColor'" when trying to create theme of whatsNewController.

 let myTheme =  WhatsNewViewController.Theme { (configuration) in
    configuration.backgroundColor = UIHelper.BARODARKCOLOR
    configuration.titleView.titleFont = .systemFont(ofSize: 30, weight: .semibold)
    configuration.titleView.titleColor = .white
    configuration.titleView.animation = .slideDown
    
    configuration.itemsView.titleFont = .systemFont(ofSize: 20, weight: .semibold)
    configuration.itemsView.titleColor = .white
    configuration.itemsView.subtitleFont = .systemFont(ofSize: 17)
    configuration.itemsView.subtitleColor = .white
    configuration.itemsView.animation = .slideUp
    
    configuration.completionButton.titleFont = .systemFont(ofSize: 17, weight: .semibold)
    configuration.completionButton.titleColor = .white
    configuration.completionButton.backgroundColor = UIHelper.BAROCOLOR
    configuration.completionButton.cornerRadius = 8
    
    
    }

Swift Version: 4.0
WhatsNewKit Version: 1.0.2
Any suggestions or workarounds? I tried updating WhatsNewKit to latest version but latest version seemed to be for swift version 4.2 and id like to get my project to build before the switch to 4.2.

@SvenTiigi
Copy link
Owner

SvenTiigi commented Sep 20, 2018

Hey @stshelton

Thanks for your detailed bug report.

The WhatsNewViewController.Theme initializer with a configuration closure is available from WhatsNewKit Version: 1.1.0

In Version 1.0.2 this initializer isn't available.

Please try to update WhatsNewKit to Version 1.1.1 which is the latest release for Swift 4.1.

@SvenTiigi SvenTiigi added the question Further information is requested label Sep 20, 2018
@stshelton
Copy link
Author

That worked, appreciate the quick response. I ran into one more issue after I built and ran my project. I'm using UserDefaults to save the "keyValueVersionStore" once I clicked the complete button my project is breaking with
Attempt to set a non-property-list object 1.3.0 as an NSUserDefaults/CFPreferences value for key de.tiigi.whatsnewkit.1.3.0

Here is how I set up whatsNewViewController

 // Local KeyValueStore
    let keyValueVersionStore = KeyValueWhatsNewVersionStore(
      keyValueable: UserDefaults.standard
    )
    
    let whatsNewController = WhatsNewViewController(whatsNew: whatsNewVersion4, configuration: configuration, versionStore: keyValueVersionStore)
  
    if let controller = whatsNewController {
      // Present it as WhatsNewViewController is available
      // after init with WhatsNewVersionStore
     self.present(controller, animated: true)
    } else {
      // WhatsNewViewController is `nil` this Version has already been presented
    }

If you want me to open another issure i can just let me know, Thanks.

@SvenTiigi
Copy link
Owner

Duplicate of #7

@SvenTiigi SvenTiigi marked this as a duplicate of #7 Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants