Image gallery in CollectionViewController - xcode

I am recently working on an iphone app in xcode 6 and created an image gallery in CollectionViewControllor, I need help about 2 things;
first I need to get a fullscreen view of the Images I have in each cell,
second How I can update the images dynamically
I really appreciate your help in advance,

A few suggestions on the two questions in this post
How to show image in full screen? Depends how you want it to show to user. One way could be to make a new view controller having a UIImage. Once you tap on the image in collection view (using didSelectItemAtIndexPath), you can pass the image to new controller which displays it.
To update the images in real time, I assume you have images stored somewhere remotely and want to fetch those in background and update the collection view. Following article may help over here
http://www.raywenderlich.com/19788/how-to-use-nsoperations-and-nsoperationqueues
Hope it helps.

Related

Best way to represent list with image(using url) in Xamarin.Forms?

I want to create List View. In this List View, I will have following fields.
StackPanel
1- Image with 300 x 400 size
2- Text-Label Controls
1 Screen will hardly cover 1 and Half ViewCell.
Images will have ImageURL. I want to load image smoothly. I also want to make smooth scroll up/down with image appearing.
Can anybody please suggest me which control I should use?
If List View, which CacheStrategy I should use?
Note: For one of such functionality, I had used List View with default CacheStrategy. In that, I just faced 1 major problem of image appearing. When page initialize first time, it show image properly. But as soon as I scroll down or scroll up, image disappear or misplace. In that case, I had suffered a lot and removed image finally.
Please suggest appropriate way for above functionality.
Thank you.
For the listview, you should definitely use RecycleElement as the CachingStrategy. See here https://developer.xamarin.com/api/type/Xamarin.Forms.ListViewCachingStrategy/#Remarks
And because the images are URLs, you can use FFImageLoading. It will fade-in the image after it is downloaded (as opposed to appearing instantly after downloaded), and you can even specify a placeholder image to use while the image is being downloaded.

add background image and push it to the back scene

A simple question. I have already finished my app with full functionality and I now need to add background images to make it look nicer. However, if I simply add on top of each view an image view, the image appears in the foreground, covering the buttons/textfields etc. How do I get round this?
Also, one of the views of my app is a scroll view. Should this be treated differently concerning background images?
Thanks
OK - I found the (very simple one-click) solution: editor>arrange>send to back...

making a UIImageView go full screen when pressed

im new to this so please excuse anything ive missed
right so ive been working on an app for a few weeks now, i have done most of my app and now on the last tab (out of 5 tabs) the last tab is a photo gallery
it has 12 UIImageViews which i have a smaller version of an image in, and what i want to do is when each one is pressed, i want the image to go full screen with a new image that is the proper one ((the full size one) if that makes sense)
i have no code written so far as im completely stuck here.
any tips or references would be a great help
Thanks! :)
show those 12 images as a background image of different 12 buttons. then u can fire an event each time you click those button .
make sure you use a same image for UIControlStateHighlighted and UIControlStateNormal.

How to check the positions of different controls in iPhone

How to check some place is already reserved by some controls before adding a new control to the view.
I have added some buttons in the UIImageView and I want to display some images in a label which I'm getting in a random size from the server.I want to place those images over the empty places in the same view.
After adding the first image in some empty place,how could I know that this place is reserved and I have to place the second image in some other placeand the images and buttons should not overlap over each other.
Can somebody please help me ?
Try using CGRectIntersectsRect on the control's frame property (which it inherits from UIView).
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html
I don't believe this will work for rotated views though...hm.
See this image for reference: http://cl.ly/3T3d3w0D2I2Q1w1r0m46

Cocoa: how to connect a button to a view?

The title question might be a little vague. I will try to explain as good as i can (also note im new to cocoa programming so excuse any mistakes :) ).
I have a VIEW that extends NSView where i would like to draw some images.
I want the images to be loaded from some files on the disk, when i click a button.
I managed to do all the loading into an NSMutableArray. My problem is, how to setup things:
- i need the NSMutableArray with the images (paths) to be available for the loading function (so i put it in a controller and assigned an action to the button in the UI). but in this case, how can i acces it in the drawRect function of my custom view class?
if i put it as a member of my custom view class, i dont know how to link it to the button , so that on the button click , the array will be filled with images paths.
I guess im a bit confused since im new to osx programming , on how these things get connected.
Hope someone could clear the air a little for me . Thanks.
The images view should have a property to hold an array of images, and the controller should set this property to its array of images. (The images view should, of course, make its own shallow copy of the array.)
images (paths)
Assuming you mean pathnames, images are not paths, and paths are not images. The controller should load the images and pass the images off to the view. The view should not care where the images might have come from.

Resources