Controlling Orientation

Controlling Orientations

By default, Pugpig supports both landscape and portrait orientations. You can limit your book to one or the other by changing the supported device orientations:

Normally, Pugpig sets the book display area to be the size of the screen. The iPhone display will be produced by scaling the iPad screen size down to iPhone size. Since the iPad and iPhone have different aspect ratios, the iPhone display is letterboxed. You can configure how Pugpig scales content by modifing viewDidLoad in your application’s view controller. If you write HTML that automatically fits to the available display size, you might want to turn off the automatic scaling.

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
  [thumbnailControl setPageSeparation:5];
  [thumbnailControl setPortraitSize:CGSizeMake(60,80)];
  [thumbnailControl setLandscapeSize:CGSizeMake(80,60)];
  [pageControl setScale:0.4166667];  // This scales the iPhone display
else {
  [thumbnailControl setPageSeparation:10];
  [thumbnailControl setPortraitSize:CGSizeMake(135,180)];
  [thumbnailControl setLandscapeSize:CGSizeMake(180,135)];
  [pageControl setScale:1.0];
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk