Should I use UIImageview or something else? - ios

I'm starting an App that will display an image and users will click a "yes" or "no" button if they like it. Then once they decide, a new image will appear and the process will repeat. They will not need to go back to previously viewed images.
My question is would you use UIImageview to do this and would you use some kind of array etc.. or what? Also how would you hook in the yes, no, and next buttons to this type of layout. Would you use a pop up for the "next" button or have it appear somehow in the view etc.. the yes and no would be fixed in place.
The images they say yes to, will appear on another view in a sort of folder.
This is only my second app. The first one I started on wobbly ground, so I'm trying to get some sold feedback before I build the foundation. If you have sample code that would be cool but not necessary at this point.
Thanks!

If you are showing only one image on the page then it is feasible to use one UIImageView and an array of images. When user wants to view next image same UIImageView control will be reused with different image.

The images can be shown in webview also but imageview is ok too. Better keep the yes and no button below the view for simplicity. To populate the imageview you use array of images and on clicking next button or whatever, you can load the next image in the array to image view.

Related

Multiple Photos in slideshow type display within viewController?

I am new to Xcode (started a few days ago).
I'm trying to find a way to get a few photos or videos in a display where the user can scroll or tap through as they desire. There will be multiple viewControllers each with a different set of photos.
Is there any existing UI type data types I can just drag and drop to make this work? Or is this out of range of the capabilities for someone not using code specifically.
I know Java, C, C++, MATLAB, etc. but never have toyed with Objective-C until now. Point being, I should be able to follow any logic you can throw at me, but I'm unfamiliar with the GUI and layout of Xcode as a whole.
This is what I currently have.
This is what I want. Perhaps with functionality to tap to full screen the image or swipe to go to another image. (This image was made with photosop. I don't actually have the picture file in Xcode because I don't know how)
SOLVED: Placed desired images in "Supporting files" content folder inside Xcode. This allowed me to select which photo I want displayed in which ImageView. To fix the proportionality issue where photos in Simulator are far too large, I simply added height and width constraints along with some other centering aspects and got the desired result.
Add UICollectionView in your view and set flow of collection view is horizontal make cell size that you want to keep.
Take a look at UICollectionViewController where you can display multiple cells with embedded views for your images, and consider segueing between them via a UINavigationController.
Edit: Now that you've added screenshots, I'd recommend using a UICollectionView embedded on your subclass of a UIViewController instead of a UICollectionViewController. This should give you more flexibility.

Implement checkbox on UITableViewCell - Swift

I am building a ToDo List type app, and I would like to place an editable checkbox in each cell in the UITableView. I want the user to be able to mark the item as completed by tapping the checkbox in the tableView. They also need to be able to tap in the cell, outside of the checkbox, and segue to a detail view.
So far I have created a custom cell class. The plan was to display an image of an unchecked box, and when the user taps the image, the image is swapped with a different image of a checked box (and the item is updated appropriately).
I tried putting a Touch Gesture Recognizer on the image, but it didn't work. Whenever the image on the cell is tapped, it just segues to the detail view. Then I found an article somewhere that says to create UIView nested inside the cell and link the Touch Gesture to that. So I tried that, but now it only work intermittently. Sometimes it recognizes the touch correctly, and sometimes it just segues to the detail view.
I've seen this idea in the Wunderlist app.
How do I go about implementing this correctly?
iOS doesn't have a native checkbox control. Apple uses a UISwitch instead.
If you want to follow Apple's HIG, use a switch.
If you want a checkbox style instead, you have several options.
You can attach a gesture recognizer to an image view and do it that way.
You can create a custom subclass of UIButton (MyCheckbox).
You can find a third party checkbox class that somebody else already created. I would look on Cocoa Controls. A quick search reveals half-a-dozen different checkbox options.
An important thing is the size of the "hit box" that the user taps. You usually want to create an image/view that's at least 30x30 points in size, and 40x40 points is better. An easy way to do that is to create your checked and unchecked images with enough whitespace around them to make them 30x30 or 40x40 points.
My guess is that your image view is too small and that's why you report that it is only working intermittently.

UIPickerView alternative for iphone something like combo box?

Are there any alternative controls instead of UIPickerView in XCode. If yes, how do they work? Can anyone suggest an alternative for UIPickerView?
You can see one in action if you download the free One Stop Plus app (women's clothes), drill down on the products until you get a view with Color, Size, etc. Tapping those buttons animates a table out of the button, with choices. Selecting one causes the table to animate back into the button. If you like that post a comment to this answer and I can tell you how to do it.
With iPhone interface, it is not feasible to enable a Combo box like a website. (I believe even Apple Guidelines would say not to do it). What you need to do is the use the UITableView to enable users to pick one option.
One thing you can do is decide whether you want to have the choice in a view shared with other controls. OR if your list if too long you can chose to push in a new view with only the choices on them and when a user selects one, the view will pop back one level.
Here is a screen shot of what i mean (maybe not the best example out there):

iOS sdk printing multiple images

i'm working on my first app and now i'm trying to implement air print in a customised version of the "Autoscroll" Apple sample code. basically i present the user with the print controller from a custom button and then they should have the choice of printing the image they have selected. autoscroll works in this way: you have 2 scroll views in a view controller a big one that allows zooming and a small one that slides in/out by tapping once on the big one. the small scroll view contains a number of thumbnails that are loaded in the big scroll view on selection by tapping. so far by studying the print photo sample code i manage to print one image; the first one loaded when the view controller is presented. i'm aware that multiple ready to print images have to in an array, but the example in the printing and drawing guide has 1 line of code and talks about an array of image views. the images i need to print go inside a scroll view.
thanks in advance for any help.
Xcode as a sample source code that u can use to archive what u want, since it as already some of the features that you want to implement.
The name of the project is ScrollViewSuite and you can download it from here: here

Changing background in iOS

Hey, I have a UIImageView in my app. And I I have 4 backgrounds created for the app. I want the user to be able to change between these 4 backgrounds. I found a video on youtube to give you an idea of where I'm going.
http://www.youtube.com/watch?v=WO9NRIHU6oQ
The user clicks on a button which open a new view allowing the user to scroll thru the backgrounds and when the user got finds the backround he or she wants the user taps on a button again to use it.
Any Ideas of how I would do this?
Seems like it could be done with a parent view controller containing a button and an imageview. The button causes a secondary view to animate up. The secondary view then has theoretically any number of imageviews (but maybe just three, a previous, a current and a next which are dynamically refreshed from an array of images). Then you just have to sync the current imageview contents with the contents of the imageview in the first view in your parent view controller.
I realize a pile of text like this is probably hard to follow, especially if you're new to iPhone programming, but do some reading into uiview and viewcontroller hierarchies and you should be able to figure something out.

Resources