alexaubry/BulletinBoard

assertIsPrepared() being called randomly

Open

#113 opened on Sep 25, 2018

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Swift (271 forks)batch import
bughelp wanted

Repository metrics

Stars
 (4,908 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Problem Description: My app would randomly crash due to assertIsPrepared() being called. Is this a known bug or am I doing something wrong?

fileprivate func assertIsPrepared() {
    precondition(isPrepared, "You must call the `prepare` function before interacting with the bulletin.")
}

Steps to reproduce: This is what I call when a button is pressed:

bulletinManager.backgroundViewStyle = .none
bulletinManager.backgroundColor =  UIColor(red:0.30, green:0.69, blue:0.94, alpha:1.00)
bulletinManager.showBulletin(above: self)

The crash seems random.

Environment:

  • Device: N/A
  • OS: iOS12
  • Version of BulletinBoard: 2.0.2

Contributor guide