Comments (4)
Hi @zllarry! Do you have any ways of reproducing this issue?
from parchment.
Hello @rechsteiner
I think i know how to do this, because i am facing similar issue right now.
Below flow to do reproduce:
- Add two view controllers into PagingViewController
- Go into second vc
- Call something to update second vc title ( self.title = "new title" ) - title need to be different then initial title
- Call pagingViewController.reloadMenu()
- Menu indicator will switch to first vc and all will be locked
I Can send you movie in private message if you need, just let me know.
Best !
from parchment.
Hi @jaceklapinski! Sorry for the late response. Are you using PagingIndexItem
? If you want to change the title of the menu item, but keep the same identity, you probably need to use a custom PagingItem. PagingIndexItem
uses the title as part of its Hashable implementation, which means it will be considered a new item when changing the title. This is why the menu will switch to the first view controller. If you were to provide a custom PagingItem with stable identifiers, it should work. You can take a look at the Icons example here for creating custom items.
That said, I think Parchment should handle reloadMenu
a bit better here. When calling reloadMenu
when the current paging item is removed (because the identity changed), we should probably remove the current content view as well. The way to achieve this today is to use reloadData
, but I think it makes sense that reloadMenu
does the same.
from parchment.
@rechsteiner i think i know where the problem is right now. And my previous assumptions was wrong
If viewController with Parchment is not visible for example I am on different tab in TabViewController and I am trying to change Parchment selected index using for example
func select(indexPath: IndexPath, animated: Bool)
It will block change pages. I made a small debug session and it looks like that problem is here:
![Screenshot 2024-02-21 at 08 43 28](https://private-user-images.githubusercontent.com/16321564/306538359-e61f8a7c-562b-4b68-8508-c730fc36a640.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc4NTAxNTYsIm5iZiI6MTcxNzg0OTg1NiwicGF0aCI6Ii8xNjMyMTU2NC8zMDY1MzgzNTktZTYxZjhhN2MtNTYyYi00YjY4LTg1MDgtYzczMGZjMzZhNjQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA4VDEyMzA1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU1NDNhM2M2MWNhMTA1YjI2MTA5ODUwMzg1NTlmZTQyZjczMDIxOTJiNzY5NTE1YWJhOWQ2NDljNGVmYTA5NDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cJk_pnDcM7vy5JGpMUetaCGZRMbLYRlAsNEdqq_aVb0)
If Parchment is not visible and user try to change selected page line 67 is triggered then when I get back to Parchment and tap on menu line 91 block changes ...
Best !
from parchment.
Related Issues (20)
- Lazy loading VC HOT 1
- keyboard avoidance issue HOT 1
- how to make collectionview rounded and add shadow to collectionview HOT 1
- Improve notification list pull to refresh
- outdated code error in PagingSizeCache HOT 3
- Getting Fatal error while using storyboard more than 2 . Unable to reload 3rd storyboard table view HOT 1
- please support indicator fixed width HOT 2
- Position of tableview is reset after tab change in header above menu example HOT 1
- Using UIAlertController in per Item HOT 3
- Navigation bar disappear when presented in a sheet. HOT 3
- About swiftUI PageView content scrollview automatically slides to the top HOT 2
- Menu item error when Archive HOT 3
- Privacy Manifest HOT 2
- Propagate .options changes when SwiftUI View is updated HOT 3
- How to fix pre-loading? I want to disable it HOT 3
- Regarding the problem that PageContentView will be reloaded when you slide it left or right. HOT 3
- Incorrect index when tab menu or swipe
- PrivacyInfo not in podspec
- Intercept PagingMenuItem click and scroll to index manually
- Why collectionView.window is nil is the pagingController is not visible ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parchment.