Simbul/baker — Issue #170: Customizable intermediate scrollView
Author: antonsukhonosenko
Created: 2011-10-16 10:57:42+00:00
State: open

I'm a designer and newbie IOS developer and I am trying to use Laker framework to make a children book for iPad.
I tried to add a feature myself, but failed and now I request any help.
The feature I needed, is to show custom image inside of intermediate scrollView instead of just plain 'Loading...' text.

What I already did before posting here:
I am not afraid of digging Objective C code, so I started with trying to put following simple code

```objectivec
UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"28.jpg"]];
[scrollView addSubview:tempImageView];
[tempImageView release];
```
into RootViewController::initPageNumbersForPages() inside loop for pages - where, as it seems to me, contents of intermediate scrollView are initialized (I did it like this: https://gist.github.com/1290752).
Obvioulsly I added my image to project resources before running the app.

Problem is, this works and image is shown, but only once - only on a scrollView which is shown while *first* html page is loading.
If I add any more html pages, all other intermediate scrollViews except first are shown without any image.
At the same time, UILabel which shows 'Loading...' text is shown correctly on every intermediate scrollView, and if I remove that UILabel, it is removed from every scrollView shown.

So, can you please tell what is possible to do to show images on intermediate scrollView consistently?
Sorry if I am asking in a wrong place, if I do. I will move my question anywhere you need it to be.

(Another option suggested by Florian, author of Laker framework, is to handle this feature the other, more flexible way: get image to show on intermediate scrollView before page from the HTML code of that page - just like page title is taken now. While I find this solution much better indeed if feasible, I also understand it is much more time-consuming).