Playing around with Modern Collection Views, I managed to create a custom UIContentView. Great. Now I would like to open the first cell/row programmatically. How do I go about doing that? This is what I would like to see on startup.
Thanks in advance for any hints.
Thank you Lee Kah Seng for pointing me in the right direction. I ended up with:
addItems(menuItems, to: nil)
// expand first section
snapshot.expand([menuItems[0]])
return snapshot
Related
I've implemented drag and drop between three collection views using UICollectionViewDragDelegate and UICollectionViewDropDelegate and it seems to be working okay. The only issue is, I don't like the long press that's required to initiate the drag session. I can't find anything in the docs explaining how to override this behaviour so was wondering if one of you fine folks could help me out?
I can see a solution proposed by julsh in the following question - Ability to shorten UIDragInteraction's long press timing - which looks great... But I don't know how to implement it against a collection view cell?
If anyone has any ideas I'd really appreciate the help.
I found this which should help. I ran into the same problem and it turns out that the UICollectionView holds the gesture recognizers.
I use a storyboard and I want to make a springboard menu like that http://static5.businessinsider.com/image/4d657896cadcbbd948120000-590/this-is-what-badoos-iphone-app-looks-like-when-you-first-launch-it-just-one-of-many-ways-to-use-the-service-smartly-you-can-do-things-without-registering-lets-look-at-people-nearby.jpg with only one page and nine icons.
I found the library Three20 but it is complex and I have problems to import it to my project.
Any suggestion?
Just for the people who are looking for the answer (it's hidden in the comments below the question);
me:
What exactly is the purpose of this springboard? Does it have to be dynamic? Do people drag things around? Can you delete stuff on it? If the answer is no for all of the questions; just place a few buttons on an empty page.. If the answer is yes on some of the questions; it's just as easy to write one yourself as it is to understand some open source framework (three20 has long passed its expiration date i.m.o).
Ángel Carlos del Pozo Muela:
Not dragging things or deleting, only select icon to go to another
view. Any advice to do it using storyboard? Thanks a lot.
me:
I think dragging buttons onto your view in a grid-like manner, and
connecting the touch events to new views, should do the trick. Even in
storyboard.
I can confirm that the old version of the Badoo app actually used three20. ;-) So I guess you're stuck with implementing that, although I wouldn't add three20 to any new project.
In my application, I want to implement a drop down view when selecting every row in the table view.Can u give me an easy solution for implementing this functionality.
Thanks in advance
this type of functionality for that visits following link Please visit here.
You can also consider using navigation. That is how it is usually done in iPhone. On selecting a row in a table, push another table with the values you want to show in the drop down.
Apple has a sample code of TableView which deals with this issue. https://developer.apple.com/library/ios/#samplecode/TableViewUpdates/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40010139 is the link to download the sample code from Apple developer library. Hope it helps.
It seems that you are requiring a popover on selecting a tableview cell.
Download and run the sample application provided here.
I hope this is the one you required.
Is it possible to add custom UITableViewCell row in addition to built-in email, phone rows inside ABPersonViewController?
I would like to add buttons like add, remove, etc in that cell, which will allow user to be added/removed into/from my application.
Please let me know, Thank you.
Pretty sure you've gotten the answer to this by this point, but I was just looking into do this myself.
Basically, No.
These controllers are not designed to be customized and Apple mentions it in their documentation.
This answer might help you:
https://stackoverflow.com/a/3507849/819355
It subclasses ABPersonViewController which allows you to play a bit with the screen controls...
Does anyone know what view/controller do I have to use to obtain the same look as the Settings application on iPad has in the left pane. Without using the splitviewcontroller that is.
Thanks in advance!
Bizarrely there is no standard control to do it. There is, however, an open source component that you can use: MGSplitViewController.
Someone created a custom class that does that. Take a look at APSplitViewController.