I have a window which gets a couple sets of data from ACS and renders them in a semi-complex layout (table view + some other stuff) all inside a scroll view. The problem is that when I first open this window the scroll view with everything in it is frozen -- the touch events for its children work but it won't scroll. But if/when I go back to another window and then reopen the one with the scrollview everything works as intended.
Either I'm doing something wrong or this is a bug. In either case I need to figure out a fix/workaround. I appreciate any input.
I figured out how to make this work. To contextualize this the code inside my CommonJS module for this view runs like this:
1) Create and add window and scroll view at the top of the module. These are just in the body of the module (not part of the constructor function which initializes it).
2) Constructor function (run when the module is initialized) which pulls a bunch of reviews (each one filled with a lot of custom fields) associated with a place from ACS.
3) ACS callback which processes the reviews, creates a table view with a single section, and adds all reviews as rows.
4) Callback from #3 which pulls the above mentioned place from ACS.
5) ACS callback which renders part of the place data inside the scroll view, attaches the tableview from #3, and then renders the rest of the place data.
The thing that fixed my problem was changing "contentHeight: 'auto'" to "contentHeight: 895" for the scroll view from #1 above.
Now that I look back on this it sort of makes sense that this was the problem -- scrollview could not guess the height of its contents -- at the same time I don't know what happens behind the scenes when my module is executed and could have only guessed that this would be a problem.
If anyone here has clues on how the sequence of code inside my module translates into a instructions for iOS to execute, please share.
Think you can help? Login to answer this question!