What would be the best way of providing small image selection in an iPhone App? - iphone

I have a bunch of small png images with about 45 x 45 pixels of size. not really big ones. there are about 40 of them right now.
I want that the user can select one of them as his avatar image. For this, I created an brand new view with an controller class. Now the problem is: How to display all those images to the user? There's no "big view". When the user touches one of them, it's going to be selected and the view switches back to the main view, where he's going to see his selected image. When he touches it, the image selection view will appear again.
So I thought about an table view, but it feels not right. The images have no title to be displayed, so it would be a big waste of screen space.
Any ideas? Should I programmatically generate a grid of UIImageView objects?

A grid is correct. Think iPhone Photos application. No need to make a completely new widget though, add multiple image views to table rows, segmenting them.

A grid seems like a good solution as it mirrors the wallpaper ui in settings so the user knows what to expect.

Another option in this case would be to use a UIPickerView. It takes up less screen space, and can be shown on the main screen (just pop up from the bottom, let them pick one, then disappear).

Related

iPhone how to get Magnified effect on certain part of the screen?

Hi all,
The images above are taken from the "Nike Boom" App. I am wondering how to do a magnified effect on the number list as shown in the images. I also want to point out that it is very very smooth animation, so screen capturing certain part of a screen and projected it back on UIView may not work (I tried that)
Thankz in advance,
Pondd
Update:
Hey,
Just so for anyone who might comes across this topic, I've made a simple sample based on Nielsbot's suggestion and posted up on github here
Please feel free to fork it, improve it and pass it on :)
Best,
Pondd
It's done with 2 scroll views, one in front of the other. One scroll view (A) contains the small numbers. The second scroll view (B) contains the zoomed numbers. The frame of (B) is the transparent window. When you scroll (A), you scroll (B) programmatically, but you move it farther than (A). (I.e. if (A) scrolls 10 pixels, you might scroll (B) 20 pixels.)
Make sense?
If you've ever used Convert.app from TapTapTap they use a similar effect.

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.

Multi changeable areas of a image on a iPhone

I have an image with picture of a person and I want to let the user to pick some area of the person and change the color. But how can I best create a multi-mask image?
E.g. should the user be able the change the color for a leg or a hand.
I am using Titanium Appcelerator, and right now I had a solution with buttons placed over the image, which is not a pretty and accepted solution.
The Kitchensink example, has only one area which can be changed.
The only solution I found for working with sections of an image is to divide the image into different views then use a vertical or horizontal view to glue them together. Sounds like you took a similar approach using buttons.
Another option might be to use one of the jQuery image libraries within the webview. This most likely will have a performance penalty though.

How to center a UIActivityIndicatorView along with text (UILabel)?

I've had this issue come up a couple times doing iPhone development now and have yet to find a good solution for it. What I'm looking for is this:
I want to show some text along with an icon and I want the overall display to be centered within its parent view. Specifically, in my current case, I'm looking to display a box that says "Reconnecting..." with a UIActivityIndicatorView to the left of the text.
Previously, I've just relied on the fact that I know exactly the dimensions of the text and activity indicator, so I can position things absolutely to appear centered. What I'm looking for is something more automatic.
Any ideas?
One of the UIKit additions to NSString will return the pixel size of the text if you give it the font that you're using on the UILabel. So then presumably the total size of the two things together in the layout you describe is:
the difference between label.frame.origin.x and activityIndicatorView.frame.origin.x; plus
the width of the text.
You can then either shuffle both the views appropriately or give them a common parent that's still a subview of the whole thing and shift that.
An activity indicator can be shown in a view just calling a single method.Please click here get SHKActivityIndicator class

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