images drag drop ios like happn app - ios

i am working on a functionality of image arrangement for that i want to let user select multiple images to its account like for example a user added 5 picture. then the images will show like a big picture for the album cover and remaining pictures on the side one under another in small sizes.
this is not a big deal and can be done by using scrollview and image view. but after that i want to do is to change my main big image with any of the remaining small images by long select the image and drag to the main big image and the small image get large to cover the big image space and the big image get small to get back to the small image place.
how should i suppose to do this. Kindly guide

In my opinion, you can do that by create 2 subviews UIImageView and UICollectionView. Long select UICollectionCellView will update UIImage in UIImageView and UICollectionCellView.

Related

iOS - Size of Image vs. Size of ImageView

just want to see if I'm on the right track here is understanding the performance trade-offs of placing various image sizes into image views.
If I have a large image, will the image load faster if I place it in a correspondingly large imageView versus placing it in a smaller imageView?
No, the loading time depends on the file, and if the image is large, and its file Size is large, it will load slower than a small images on the same image View.
To make it clear, image view doesn't affect loading performance, image size (File size) does affect performance.
Answering you r question first, size of image is not directly proportional to imageview i.e. regardless of your imageview size, you image will take time based on the size of image.
Now, if you have a task in which you need to show user images & on click you need to share that image, you need to maintain 2 copies for showing take resized copy & while sharing pick image from original position. In this way, your loading will be fast & while sharing you will be able to share original image itself.

ios swift crop image to the size of device

everyone. For the App on which I am working I want to let users be able to select own image and set it as the background of App. The Problem I face is how to let users crop the image fitting the size of device's screen if the image is larger. Another question is if users want to select a pretty small image and set it as the background, should I just say no to it?
We don't know how you've set up your app so we can only speculate. BUT you could create a UIImageView that is behind everything else. When the user selects a picture just set that picture to that image views background....
As for the cropping...if you use constraints and tell that image view to be 0 from top, 0 from left, 0 from right, and 0 from bottom it will automatically resize based on size of device. Also you would need to set that image views scale property so the image doesn't distort...
Finally, usually when you have images on the device you create a 1x, 2x, and 3x size and Xcode will automatically use the appropriate size ...but again we have no idea how your app works...so if the user is trying to use an image that is 15 pixels by 15 pixels and have it fill the whole screen...it's going to look pixelated
You might want to write a function that gets the image size and if it fails to meet specifications you set...tell the user somehow (UIAlert...)
All of that being said...
Folk here on Stack Overflow generally don't take time to help on questions that have no code example shown...generally speaking you attempt to figure it out first and then post...so show code that you've tried, or take a screen shot of how your View Controller looks like...

UIView manipulation for collage like picture in high resolution

I'm currently working on a collage application where users can combine multiple images into one collage (in a grid like layout, like 2x2). I worked on a couple of examples where coders used a UIView to which the images were added as Subviews. The subviews itself are zoomable and scrollable, so that the images can be adjustet inside their boxes.
The results are then exported as a JPEG reprensentation. While the results are okish, the problem is that output from the UIView only is as big as its screen size (640x640 for a 2x Screen on an iPhone 4 / 5). I was wondering if there would be better way to maybe compose a higher resolution image from the original image sources with consideration of the changes made in the view.
The View

how to display image (containing text) with a good quality

I’m new in iOS and trying to make simple app with hierarchy of viewcontrollers. In the last one I wanna display scrollable image (which can also be zoomed at least x1,5), containing some small black and white picture and a piece of text. Initially I planned to make vector image, convert it to .jpg and use UIScrollView for displaying. But I found out that .jpg ( approx. 150 KB) didn’t provide a good quality for displaying text. As I have to use a lot of images I don’t want to increase image size. What is worse I also want it look good on retina display.
Can you recommend a way how to display image, containing text, with enough quality?
I mean that I don’t want the user see the separate pixels of letters in the text. Just like when you read text in your e-mail in iOS. Image size should be as small as possible. Planning physical size of image – approx. 5 cm x 15 cm.
Any help much appreciated
Thanks
To get good edges you would need to use png not jpg, which will make the image sizes much larger. I have a better suggestion, more code but better solution.
The answer is to not put the text into the image, but to draw it over it in real time.
You would:
associate text at some coordinate in the image (say a CGRect) with the image
create a uiimageview subclass that in the drawRect routine, after calling super, draws the text using the NSString categories on UIKit (which let you draw into a context)
To get going on this please create a small one vc project and get the subclass working there, then back port it to your primary project.

Camera/photo gallery in corona sdk

In my application,I used PhotoLibrary,it get photo, small part of that image.In full image it picks only the corner part.i searched over the net it tells,it checks the device size and image size return device size image only.then how it is possible to bring whole image.
Many photos are larger than the screen size. Corona can only show what's on screen. You have two choices, put the larger image inside of a widget.newScrollVew() so you scroll around and see the larger image, or scale the image down until it fits on the screen.

Resources