FGallery does not begin in thumbnail view - iphone

What am I doing wrong? FGallery is not starting in thumbnail view?
FotosGalleryViewController *vc = [[FotosGalleryViewController alloc] initWithPhotoSource:self];
vc.beginsInThumbnailView = YES;
[self.navigationController pushViewController:vc animated:YES];

When I turn showThumbnailViewWithAnimation:BOOL into a public method and call:
[self showThumbnailViewWithAnimation:YES];
within the FGalleryViewController it works. But it only loads the first two images in thumbnail view, the rest stays gray. Clicking Close and See all again fixes this and everything works as promised?

Related

Form Sheet Modal View Animations

I have UIModalPresentationFormSheet views appearing in my app. Some of them appear from the Right some from the Bottom and the dismissing seems random. Some disappear to the Bottom some go Left some go Up. Is there a way to set the direction they appear from and dismiss to?
Code I use to present (this same code, just different viewcontroller being presented, called from the same view controller has varying animations for different modal views):
MyViewController *newModalView = [[MyViewController alloc] init];
newModalView.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:newModalView animated:YES];
Then in the modal view I call this to dismiss it:
[self dismissModalViewControllerAnimated:YES];
This is a known bug and is being worked on by apple.
Try something like this:
newModalView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
All the transition Styles:
newModalView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
newModalView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
newModalView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

EGOPhotoViewer: Start at specific photo

I am using EGOPhotoViewer to load up a bunch of images from the web. They are shown in thumbnails first, so when a user clicks on one of the thumbs, I want to show that image in the EGOPhotoViewer first. So, if I clicked the 5th image, it would load the image viewer starting at 5 of 20 or whatever.
Is there a way to do this?
ZSPhoto *photo;
for (Asset *a in items) {
photo = [[ZSPhoto alloc] initWithImageURL:[NSURL URLWithString:a.imgURL] name:a.caption];
[photos addObject:photo];
[photo release];
}
// Photosource
ZSPhotoSource *photoSource = [[ZSPhotoSource alloc] initWithPhotos:[NSArray arrayWithArray:photos]];
EGOPhotoViewController *photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:photoSource];
// Set starting photo index here?
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:photoController];
navController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
navController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:navController animated:YES];
[navController release];
[photoController release];
I was running into the same problem, What I was doing was trying to moveToPhotoAtIndex: before pushing it to the navigationController. You need to do it after.
here is how i got it to work for my application...
// gets indexPath from tableView
-(void)showSelectedPhoto:(NSIndexPath *)indexPath{
// Already had photoControllerView declared in header, init with your photo source
photoControllerView = [[EGOPhotoViewController alloc] initWithPhotoSource:source];
// pushed the photoControllerView to the navigation controller
[self.navigationController pushViewController:photoController animated:YES];
// THEN you moveToPhotoAtIndex and it should work correctly!
[photoController moveToPhotoAtIndex:indexPath.row animated:NO];
}
Hope this helps clarify things!
There is a method moveToPhotoAtIndex:animated: that you should be able to use.
i am using same process to load the images in image viewer. and app is working fine for me..you can get the code from here
selected image wouldnt load in ego image viewer in ios 7
hope you will get help.

view not showing

Greetings guys,
I am a newbie in iphone programming. Basically my problem is the following:
I have a view which have inside an info button and a UIScrollView and inside this scrollview I have programatically added buttons with images.
When I press the info button the next view shows up, however when I press a button from scrollview nothing happens knowing that it is catching the click and it is accessing the function that is responsible for showing the next view.
- (void)showFlipid)sender{
FlipsideViewController *controller = initWithNibName:#"FlipsideView" bundle:nil];
controller.delegate = self;
NSlog(#"1"); // IT IS SHOWING WHEN I PRESS A BUTTON FROM UISCRoll
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
}
Please help
It seems that your code is missing critical line.
Try to add :
[self presentModalViewController:navigation animated:YES];
at the end of your code.
BTW
you should release the controller at the end.

Show a modalViewController after image picking

I want to present a modalViewController(do some picture drawing) right after dismiss the imagePickerController(exactly after finish image picking). I've tried to set up a IBAction with a bar button and it works fine when I tap it. But what I want is present the modalViewController as soon as I finish the image picking
Here is my code:
-(void)imagePickerController:(UIImagePicerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info{
[self dismissModalViewControllerAnimated:YES];
//dismiss the imagePickerController
drawViewController *drawView = [[drawViewController alloc] init];
[self presentModalViewController:drawView animated:YES];
}
Thanks!
The dismiss and presentModal can't both animate in the same method. The presentModal will seem to do nothing. For the dismiss, try setting the animated to NO.
After dissmissing the imagePickerController the viewDidAppear is called. You can there call the drawViewcontroller.
-(void)viewDidAppear:(BOOL)animated{
drawViewController *drawView = [[drawViewController alloc] init];
[self presentModalViewController:drawView animated:YES];
}

iPhone SDK - Changing Xib files (partial curl)

I am creating an iPhone app for iOS 4 using the newest SDK.
On one of my pages I would like the user to click a thumbnail of a photo and then a partial curl transition style take affect to show a full sized version of the image.
On the page with the full sized image I have a toolbar with a "Back" button and a "Select" button.
When I click the Back button the partial curls rolls back down to my first Xib.
BUT when I click the Select button, the app crashes.
Can anyone help me or explain why it is doing this? Thanks!
.m file:
-(IBAction)switchViews4 {
ImagePicker *image = [[ImagePicker alloc] initWithNibName:nil bundle:nil];
image.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:image animated:YES];
[image release];
}
Without seeing any other code, it is difficult to know why. But one guess is that you have a reference counting problem. Try:
-(IBAction)switchViews4 {
ImagePicker *image = [[[ImagePicker alloc] initWithNibName:nil bundle:nil] autorelease];
image.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:image animated:YES];
}
and see if it helps.