The one minute eBook project

A friend of mine is a very talented artist, he is specialized in comics books and every time I see him drawing something it feels like something magic is happening to me. Some time ago he gave me some drawings in order to try to build an eBook with Creo so I decide to write this post in order to show how easily a simple eBook app can be created.

1. Start with a folder full of images you want to use for your eBook (mine are 2048×1536 jpeg images).
Images folder

2. Drag that folder from the Finder to your project Assets.
Assets

3. We do not need a NavigationBar in this app so drag Window1 out of Navigation1 and delete Navigation1.
image3

4. We want our app to be Landscape and without a StatusBar, so from Window inspector set StatusBar to Hidden and then press “cmd+right arrow” to rotate the window in landscape mode. (Then press cmd+0 (zero) to zoom to fit screen if you want).
image4

5. We want iPad preview so select iPad from the device topbar selector.
Change platform

6. Drop a view from Objects pane to Project Templates, then resize view to be 1024×768.
image6

7. Drop an ImageView from Objects pane, resize it to fit view size and adjust its autoresizing mask.
image7

8. Select Properties from Inspector and drag from the ImageView binding point to the exposed properties list.
image8

9. Set Property Name to Image (it is the name that will be used in the container’s inspector) and select an appropriate key path value, in this case it is image.
image9

All done on custom view side so let’s switch to Window1.

10. Drag a PageContainer from Objects pane and resize it to fit window size.
image10

11. In PageContainer inspector:

  • IMPORTANT: there is a bug in version 1.0b1 Build 4558 that could lead to a crash, as a workaround just change Style to PageScroll (this bug has already been fixed in the upcoming b2 version).
  • Select CustomView1 as Template
  • Select Assets as DataSet (each folder inside Assets or Documents is automatically exposed as a DataSet), and KeyPath is automatically filled with Assets.Pages (Pages is the name of the folder that contains my images collection).

image11

Here you go a video that shows you how the app runs inside the simulator and inside a real device using Creo iOS dev player app.

Notes:

  • Creo builds universal app so if you want to test on a iPhone just adjust PageContainer autoresizing mask.
  • PageContainer is a very powerful control that enables you to create pages using a custom view and a dynamic source like a DataSet.

6 thoughts on “The one minute eBook project

Leave a Reply

Your email address will not be published. Required fields are marked *