|
I know that there is a I need two custom pickers, and I'm struggling to get them "just right". The first is a picker that allows multiple selections. In theory, I already have this, but in practice, there is something a little wonky going on and I can't figure it out. Background: I'm creating an audiobook library curating app, and I'm trying to implement functionality for the user to make a book series and add books to it. What I have, code-wise, is this:
In the preview, this works exactly as it should. But when I actually run the app, a strange thing happens. The first time I tap on a book to select it, the list view changes. It's easier to demonstrate, so here is a video: https://user-images.githubusercontent.com/56804260/111397102-b58eca00-867d-11eb-8769-0e5992994d13.mov I don't really understand why it's doing that and have no idea how to fix it. My other custom picker view is both simpler and more complex. It appears if the user is attempting to create a series, but one or more series with the same title already exist in the database. I want to present the user with a list of all the it items with matching titles and ask the user I only need it to allow one selection, but I want it to appear like an alert or action sheet. Since you can't add a picker to an alert or action sheet, I've sort of cheated by making an action sheet with each button one of the options the user can select, but it's just...clumsy.
Does anyone have any advice, or links to other tutorials, on how I might accomplish the sort of functionality I'm going for here? |
|
I figured out what is going on with the view, and how to prevent it, but not why it was happening that way. I hadn't set a It's a minor change and not a hardship, but I'd really like to understand why it was happening. |
SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.