You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The init function was changed to directly set properties on the contentView. This is problematic because the properties cannot be read. In our app it causes issues as we use the item tag and all items have tag 0 instead of the value we set in the init.
Repro example:
let item = ESTabBarItem(
BounceTabBarItem(),
title: "My Tab",
image: .imageAsset,
selectedImage: .activeImageAsset,
tag: 7
)
print(item.tag) //prints 0. 7 is expected
print(item.contentView.tag) // prints 7
The fix should be to go back to setting the contentView properties as a result of calling the setters on ESTabBarItem.
(A different question is how on earth we didn't update this library until recently and discovered this bug from 2020)
The text was updated successfully, but these errors were encountered:
I think the easiest fix is to revert the change to the init function and bring back the open func setTitle(_ title: String? = nil, image: UIImage? = nil, selectedImage: UIImage? = nil, tag: Int = 0) { function
If the calls are made to set the title, image, selectedImage and tag on self they are propagated to the contentView in didSet.
I don't have a PR ready, but I can probably create one. Not until earliest in the new year though.
With the changes from c454e05#diff-5abb945dc5865b317e84e001627a243f52e8b34f819e833d954e39b062fa38a1
The init function was changed to directly set properties on the contentView. This is problematic because the properties cannot be read. In our app it causes issues as we use the item tag and all items have tag 0 instead of the value we set in the init.
Repro example:
The fix should be to go back to setting the contentView properties as a result of calling the setters on ESTabBarItem.
(A different question is how on earth we didn't update this library until recently and discovered this bug from 2020)
The text was updated successfully, but these errors were encountered: