XHTwitterPaggingViewer icon indicating copy to clipboard operation
XHTwitterPaggingViewer copied to clipboard

iOS 8 - Page control and title not updating ?

Open kumararun540 opened this issue 11 years ago • 5 comments

How can i fix to work on iOS 8 ?

kumararun540 avatar Nov 07 '14 08:11 kumararun540

in demo not work?

xhzengAIB avatar Nov 07 '14 13:11 xhzengAIB

Yes - This line is creating problem - [twitterPaggingViewer setCurrentPage:2 animated:NO]; I just commented this line and its working fine.

But i need to select the middle page automatically ?

And Some times its crashing also -

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 18]'

kumararun540 avatar Nov 08 '14 12:11 kumararun540

Where are you calling -setCurrentPage:animated? If you're calling it in the app delegate it won't work. Instead, add a property in your app delegate and then switch the current page from the first page that gets loaded from the pager.

So, in your app delegate

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) XHTwitterPaggingViewer *paging;
@end

then on the first view controller that gets loaded by XHTwitterPaggingViewer

- (void)viewDidLoad {

    [super viewDidLoad];

    self.appDelegate = [UIApplication sharedApplication].delegate;

    [self.appDelegate.paging setCurrentPage:1 animated:NO];

}

This is working for me at least.

ghost avatar Dec 07 '14 23:12 ghost

@clockworx132 Thank you! I will check this demo crash where,

xhzengAIB avatar Mar 05 '15 01:03 xhzengAIB

I have encountered the same issue, i needed to show the second page initially. yes, it is showing my second page, but the navigation title and the page index does not update anymore.

mnbayan avatar Mar 11 '15 08:03 mnbayan