alexaubry / alexaubry/BulletinBoard

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

Đang mở
#112 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Swift
Star
5.3k
Fork
301
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Problem Description:**
I followed [this suggestion](https://github.com/alexaubry/BulletinBoard/issues/50#issuecomment-370392843) 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](https://github.com/alexaubry/BulletinBoard/blob/db62747228ba4a3d2e58c15c718c3deeaf15af6e/Sources/BLTNItemManager.swift#L273), 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](https://github.com/alexaubry/BulletinBoard/files/2389519/BLTNBoardBug.zip).
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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.