alexaubry / alexaubry/BulletinBoard

Allow adding of new items to BLTNItemManager instance without pushing immediately

オープン
#85 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Swift
スター
5.3k
フォーク
301
PR マージ指標
30日以内にマージされた PR はありません

説明

### New Issue Checklist

- [x] I updated BulletinBoard to the latest version.
- [x] I read the [Contribution Guidelines](https://github.com/alexaubry/BulletinBoard/blob/master/CONTRIBUTING.md).
- [x] I read the [documentation](https://alexaubry.github.io/BulletinBoard).
- [x] I searched for [existing GitHub issues](https://github.com/alexaubry/BulletinBoard/issues).

### Issue Description

Current BulletinBoard build requires us to declare the manager instance at the start of the view controller. However, at the start of the program, my app has not received any data yet. I can only pass in the data to show in the BulletinItem after user performs a certain action.

At the moment I can only add a new item to the bulletinManager through the `manager?.push(item:)` method. This method forces the bulletin to **immediately** change to the new item that was pushed in.

This behaviour may be mitigated by,
```
page.nextItem = makeLocationPage() // Creates a new PageBulletinItem

page.actionHandler = { (item: PageBulletinItem) in
item.manager?.displayNextItem()
}
```
but as my root bulletin item **DOES NOT** contain the params that I need at the start of the app, I can't pass them in when I first declare the root bulletin item in my bulletinManager.

Best solution now is to allow the manager to have a method of adding a BLTNPageItem without immediately presenting the new item.

### Environment

- **BulletinBoard Version**: 2.0.1
- **iOS Version**: 11.4
- **Device(s)**: iPhone X

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。