0

If i have to display page number as title on uitoolbar at the bottom like this

_toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 960, self.view.bounds.size.width, 45)];


_title1 = [[UIBarButtonItem alloc] initWithTitle:[NSString stringWithFormat:@"Page %u", currentIndex]
                                           style:UIBarButtonItemStylePlain
                                          target:nil
                                          action:nil];

Then is it possible to update page number on UIToolbar when page is turned over

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user1120133
  • 3,244
  • 3
  • 48
  • 90
  • 1
    Yes it is possible. What is your actual question? Do you need help updating `currentIndex` as each page is turned? Or do you not know how to update the toolbar each time `currentIndex` is updated? – rmaddy Jul 08 '13 at 23:57
  • How to update toolbar each time current index is updated. – user1120133 Jul 09 '13 at 00:55
  • You need to recreate the toolbar items with the updated details. You can't simply update the existing item with the page number. – rmaddy Jul 09 '13 at 01:08

1 Answers1

0

Set up a delegate system using protocols.

MichaelScaria
  • 1,560
  • 2
  • 16
  • 25