image Gallery in iPhone - iphone

I need to Create an Image Gallery that may be use concept of scrolling and paging together.
When I click on a button, it will open a new view in landscape mode. This view is for my Image Gallery..
It shows 5 Images:
Centered Large Image With its description on Bottom.
Next Coming image on left side, This image is slightly tilled at some angle, Without any description at bottom.
next to next coming image on left to 2nd image.
previous image on right side, This image is slightly tilled at some angle, Without any description at bottom.
Previous to Previous image on right of 4th image
Moreover, all images should be scrollable, like when I scroll 2nd image, it will move to Center and show its description and image which is already centered move to previous image.
Sorry for my confused English, here's an example of what I am trying to obtain.
I tried for basic code of paging and scrolling but unluckily nothing helpful.
Could you give me some pointers?

Check out flowcover (see this question: Open source CoverFlow library for iPhone), which should get you started.

I think someone reported flowcover doesn't work on iOS 4.0, I haven't tried yet, ofcourse.
But, you can also take a look to this OpenFlow project, It will be help you I guess. Many people has builts their app on this library.

Related

Eclipse RCP displays images in a DecorationOverlayIcon to big, how do I get it smaller?

I basically want to make overlays like you know them from the package explorer in eclipse, a base image, and a smaller picture laid above in the bottom right corner. I used DecorationOverlayIcon for this and fist some pics from the already existing resources just to if it works. It the overlays showed up, but even though I had given the following instructions
imageDescriptorArray[IDecoration.BOTTOM_RIGHT] = alreadyExistingImageDescriptor;
DecorationOverlayIcon(baseImage, overlaysArray);
the overlayed image was very big. Than I made my icon, which is a 16x16 .png. It like the other pictures covers up the icon almost completely. How do I make the image smaller, do I have to convert it to a smaller size like 8x8 for that, or alternatively, how do I push it further down?
DecorationOverlayIcon doesn't resize anything so you must provide small images for the overlays.
There is also no way to change the calculated position of the overlays.

iPhone hide portion of image in UIScrollView

I am brand new to iPhone app development. I am trying to create an image reader using UIScrollView. I need to focus a portion of an image and hide the rest. Till now I am only able to focus required part of an image but have no clue how to hide the rest. I had a suggestion that, I need to add four views at top, bottom, left and right. I need to hide those as per requirement. But, I was able to go no where with the suggestion. Can you please tell me how can I implement the functionality?
I don't understand what you really want to do. But if you think putting for views above I might suggest you use mask image for the same. Use alpha component.
Atlast I was successful in hiding part of an image. I used four views with background color and resized them according to the portion I need to display.

UI Button with Image Smaller than Touchable Area

I've not much response so am adding some more info.
My buttons are not rectangular, nor organised in a grid so I need a way of creating what looks like a button (and shows that it has been pressed visually, as per a standard UIButton) but where the touchable area is different to the image area.
I am using a transparent PNG and that element works fine. I've added the buttons in Interface Builder and am wondering if that is the problem.
However, if I change imageEdgeInsets, it distorts the image display, which is obviously not what I want.
Bizarrely, if I increase the dimemsions of the button, it doesn't change the image, but if I decrease them it does.
I have tried different combinations of mode (scale to fill etc), but to no avail.
I am aware that there is an image and background image property, but in IB there is only one.
Essentially, I don't understand how the geometry works and the Apple documentation doesn't seem to help.
Surely, I can't be the only person to try to do this. Any help would be warmly welcomed.
Many thanks,
Chris.
Try setting the buttons setting to Aspect Fit. This will fill the button with your image so a smaller image than the button size would leave the space around the image.
Also set the button type to custom.
In the end, I stumbled across Ole Begemann's Non-rectangular buttons class. It just does what I need - to be able to create buttons where the touchable area follows the visible element of a non rectangular image.
#Helium3 - thanks - that allowed me to use a larger touch area, bit not a smaller one.

Image "frame/window" on iphone

I have numerous photos in portrait and landscape format. I want to be able to display a "crop" of the photo in a UIImageView on the iphone. If the picture is in landscape format I want it to resize to fit the frame, if it is in portrait format I need it to resize to fit the width, and then be cropped at the top and bottom. As if there is a "window" over the image - so it looks like a landscape picture.
It would be even better if this could be a UIButton - although I am aware that I can use touchesBegan and such on images to make it behave like a button if needs be.
Thanks for any help you can give me.
Thanks
Tom
In an ImageView, you can change the View Mode to Aspect Fill. It will give you the right scaling/cropping you want.
For interactions, you can use a Custom button with no drawing at all (no Title, no Image, no Background) with the same size as your ImageView. That would be safe with regards to the image aspect. I've tried similar stuff using the button's Background or Image properties, it can have some undesired effects (I've ran into a resizing issue on iOS 3.1.3 for instance).
1°) To Crop the Image, try to add a method to UIImage class to do it (you can google it without problem, or even on StackOverFlow)
2°) To add a "window" over your image, just add an UIImageView over your image wich has transparency. It should work ;-)
3°) To know when an image is touched, you can use "touchesBegan" to detect which image were selected. But I think it's the last of your problems ^^
What you cant to achieve isn't so hard, just to it step by step !
If you want more help in one step, say it. But I can't code it all for you ;-)
Good Luck

View Behind View rolldown effect on iOS (Like folders on home screen)

What would be the best way to accomplish the home screen folder roll-open effect with views in Objective C?
I tried something similar to what MaxFish has described. You can check it here iOS Open Folder Animation Sample Code
If you take a look at the images inside the Springboard.app in your iPhone in "/System/Library/CoreServices" you can have an idea of how the animation works.
A simple version of the effect can be done this way:
Take a screenshot of the screen you want to "cut" and save it in an image
Create two imageviews each of which has a part of the screenshot (e.g. the first has the first upper part of the image as background, the second the rest), you could alternative use the same background image for both views, you have only to play with content alignments.
Place the two views on the original screen in the exact position to make them seem like one entire image perfectly aligned with the original screen.
Create a view (folder content) with its own background and whatever you want to put inside, place it at the same Y of the bottom imageview but beneath it.
Make the bottom image view scroll down for the entire size of the content view, you will see the folder content appear.
iOS version put on the sliding images some nice borders and applies fade effect which make the overall animation really cool. You can sure try and make it nice looking.
Hope this helps