Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc problem with UINavigationController #27

Open
saturngod opened this issue Jun 18, 2012 · 1 comment
Open

Arc problem with UINavigationController #27

saturngod opened this issue Jun 18, 2012 · 1 comment

Comments

@saturngod
Copy link
Contributor

Following code is working but there is no NavigationBar

promoGallery* gallery = [[promoGallery alloc] init];
gallery.imageArray = self.fullImageArray;

FGalleryViewController* pVC = [[FGalleryViewController alloc] initWithPhotoSource:gallery];
pVC.currentIndex = btn.tag;


[self presentModalViewController:pVC animated:YES];

So, I put navigation controller like below and it crash

promoGallery* gallery = [[promoGallery alloc] init];
gallery.imageArray = self.fullImageArray;

FGalleryViewController* pVC = [[FGalleryViewController alloc] initWithPhotoSource:gallery];
pVC.currentIndex = btn.tag;

UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:pVC];

[self presentModalViewController:navController animated:YES];

I check the code and it's problem in

- (void)updateScrollSize
{
float contentWidth = _scroller.frame.size.width * [_photoSource numberOfPhotosForPhotoGallery:self];
[_scroller setContentSize:CGSizeMake(contentWidth, _scroller.frame.size.height)];
}

there is no _photoSource after init with UINavigationBar

@Erzekiel
Copy link

Thanks for this post, you saved my day...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants