BulletinBoard icon indicating copy to clipboard operation
BulletinBoard copied to clipboard

Buttons in Selector item not updating text color after hiding activity indicator

Open n3d1117 opened this issue 5 years ago • 0 comments

Problem Description: I followed this suggestion to show the activity indicator as soon as a selector item (e.g PetSelectorBulletinPage) is displayed, by using shouldStartWithActivityIndicator = true and implementing presentationHandler.

After hiding the activity indicator, however, the two buttons under description aren't responding to touches, i.e. their text color isn't refreshing after calling setTitleColor.

I think the bug could be related to this line, specifically the parameter elementsChanged being false in function call. However I couldn't find the exact issue preventing buttons from refreshing correctly. Any help is appreciated.

Steps to reproduce: I created a sample project demonstrating the issue that can be downloaded here. Relevant portion of code:

enum BulletinDataSource {
    
    static func makeChoicePage() -> PetSelectorBulletinPage {
        let page = PetSelectorBulletinPage(title: "Choose your Favorite")
        page.descriptionText = "Your favorite pets will appear when you open the app."
        page.actionButtonTitle = "Select"
        
        // BUG: Uncomment the following lines to make buttons unresponsive to UI updates
        /*
        page.shouldStartWithActivityIndicator = true
        page.presentationHandler = { item in
            item.manager?.hideActivityIndicator()
        }
        */
        return page
    }
}

Environment:

  • Device: Simulator
  • OS: iOS 11.4
  • Version of BulletinBoard: 2.0.2 (latest)

n3d1117 avatar Sep 17 '18 17:09 n3d1117