UICollectionView: Waterfall layout with Drag & Drop - ios

I am using CHTCollectionViewWaterfallLayout as the layout for my collectionView, since my cells do all have different sizes. But I would also like to implement drag & drop in my collectionView. The libraries I have found would not allow me to implement both at the same time. Is there any way to do this?
Thanks

I found a way to do it, I used one of the existing Drag 'n Drop libraries and made sure it inherited from the CHTCollectionView instead of the UICollectionViewFlowLayout, this worked pretty good! Still some errors to work out, but the beginning is there

Related

Swift: Drag and drop cells within the same UICollectionViewController

I am building an app which enables user to drag a UIView onto another. Currently I have the implementation as a UIScrollView but that does not give me the best experience as to achieve an experience like Apple's drag and drop requires handling of many cases ( including edge cases).
I am curious if this can be done using a UICollectionView. I am looking to drag cells onto another cells after which the cells contents merge and the source cell is removed.
Any idea/ suggestion would be appreciated. I am not sure if adding what I have is neccessary but if needed I can certainly add the code which I have.
Yes, using a collectionView would be a good choice for scrolling and drag/drop. There are many built in methods that support drag and drop.
https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/supporting_drag_and_drop_in_collection_views

Can anyone suggest what to use to make the UI screen as Mention?

I have design the UI for the below screen as I am little bit confuse that what should have to use for the below screen. As you seen the on the screen below things:
1.Scrolling part of Images swap.
2.Again another Scrolling images Swap.
So here for the scrolling Images what should I use its Collection View for both or Pagecontrol for one and Collection view for other. Please suggest me.
Thanks and Appreciate for the help...
Use UITableView and in its cell use UICollectionCell so that you can scroll horizontally and vertically.
see Back image, this is how you can implemented output looked like.
As Tinu Dahiya pointed it correctly, You should use tableView and custom tableViewCells to achieve your UI design. This approach will also make your coding easy to handle dynamic contents which you might be fetching from server. For your reference you can directly use this control from cocoa controls. This control is ready made dish for you, you just have to implement your logic to achieve your functionality.

Swift-How to add a parallax header like the one in Spotify?

I was wondering if anyone knew what the best way of creating a similar tableview header effect to the one in Spotify was. I have looked at libraries such as CSSStickyHeaderFlowLayout, but they are written in Obj-C and are for CollectionViews. What's basically got to happen is that as the user scrolls to find more tableview cells at the bottom, the header stays in the same place and the top cells start covering it. This is seen in the example section of the git page of the library above.
Thanks in advance for any help!
Try using the solution found here
The original example uses Obj-C but the asker's response uses Swift. They also make use of TableViews rather than CollectionViews

iOS : How do I slide a list item to expose commands (w/ storyboards)

I just started iOS development (I've been web dev for 6+ years) and I'm struggling with understanding how to build my UI beyond the default elements.
I feel like I started at kind of an awkward time. The resources I can find on creating a custom UI forgo the use of storyboards. Yet Xcode5 seems to force the use of storyboards (granted it's in beta so this may change).
While my current goal is to make list items slide over to expose custom actions (similar to mailbox, cobook, and countless other apps), really what I'm asking is for good resources on creating more custom UI's while still using storyboards that will lead me in the direction I need to go in order to do that.
Any help is appreciated, I've been desperately fighting the urge to take the easy way out and just use PhoneGap.
Thanks guys.
Check out this guide. In it they show how to make UITableViewCells with horizontal pan gestures so you can create the sort of effect that you are looking for.
http://www.raywenderlich.com/21842/how-to-make-a-gesture-driven-to-do-list-app-part-13
It uses a .xib file (I agree with you about the degree to which people using xib files in tutorials is incredibly annoying when storyboards seem to be the direction Apple is going in). However, you can make a UITableViewController in the storyboard. I would mostly use this in order to learn how to make custom UITableViewCells that can then be used in any sort of UITableView. You simply need to select the cell in the tableview, make the class of the cell the type of UITableViewCell you want (under the "Show Identity Inspector") and then make it the class of your custom UITableViewCell. Then when you call dequeueCellWithIdentifier, make sure the identifier is the same as the cell in the storyboard, and also cast the cell to your custom type like so...
MySlidingTableViewCell * cell = (MySlidingTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
And make sure you #import the class for the cell.

How to drag and drop any object with same code?

I'm building an app for the iPhone and I need to drag and drop allot of different objects.
I have found allot of separate ways to drag and drop UIImageViews, UIButtons etc. But I was wondering if there is a universal way to program any object to able to drag and drop?
You may want to consider using one or more UIGestureRecognizers for each view. Here's a reference to the docs.
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html

Resources