-1

I am new to iPhone developer,

I am making Book Reader app, in which i have 40 books, when i place each books in my background image, my image doesn't scroll, i want scrolling in my UIImage.

I tried this but it doesn't scroll my image.

self.view.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"bg.png"]]];

In short: i want to increase size of the background image depending on content.

See my Snapshot :

Community
  • 1
  • 1
Krunal
  • 6,440
  • 21
  • 91
  • 155

1 Answers1

1

One thing.. Setting a longer BG image wont make your controllers size large... You need to either take UIScrollView to let you view remaining Items or you have to set the size of your books in such a way that they changes their size in such a manner that they get fit depending upon their numbers. If you want to have it without UIScrollView and all books at the same page no matter what is the total number of Book then as Павел Оганесян says in one of his comments

At first, get it working with static sized view (as for 40 book always, for example). Then improve you solution to any number of books.

Suresh Varma
  • 9,750
  • 1
  • 60
  • 91