Widgets in tableview or scrollview Corona - lua

I'm new to Corona and I want to make a collapsed tableview which scrolls,
that has widgets in it, like checkboxes, buttons and pickerwheels.
Is that possible?
Thanks for det help!

https://docs.coronalabs.com/api/library/widget/newTableView.html, have a look at this api. Here there s an function called insert rows in that function you can add widgets to each you create in an table view.

Related

How to use collapse option to display list of users

How to design and code this in swift(IOS) AND Xcode.If we tap on down button it should display items and vice-versa like this:
You need a Collapsable TableView. In order to achieve that, in your TableView you must keep track of which sections are collapsed (contracted) and which of them are expanded. For this you need to maintain a set of indices of sections that are expanded, or a boolean array where the value of each index indicates if the corresponding section is expanded or not. Check for the values at the specific index while assigning height to a certain row. Check this link for more help.
Refer ans by #Cristik.Refer my previous ans for more info.
You need expandable table view. Basically, you need to control the open and close of sections of your table view.
Here is an good example with working code & animation written in swift 3.0

Accordion for UIView and SubViews in Swift 3

I'm trying to build an accordion style ( expand/collapse ) list in IOS/Swift 3. Was confused on which approach to follow like a static UITableView ( since my sub divisions have different types of Ui Controls in the cells ie some have checkbox ,spinner, textview etc. with labels to show configure a list of different Valves) , UIView with nested UIViews sections with an option to clip views . But both have been messed up with without any success.
Illustration
http://imgur.com/a/Bs9SF
Below are the links I followed
https://github.com/justinmfischer/SwiftyAccordionCells
http://www.appcoda.com/ios-static-table-view-storyboard/
https://github.com/Weebly/TableSchemer
https://github.com/Alliants/ALAccordion
Any other approach without UITableView?
Please help . Thanks in advance .
Static vs dynamic table will depend on your data source. Does your data source for your table change? If so you'll want a dynamic table, if not then you can design it out in a static one.
As for the accordion feature, what I've done in the past is to add a tap gesture recognizer to the header view of each section. When the tap is detected I change my datasource and reload the table view. What happens is that number of rows for section is called on reload, and I return 0 so that none of the rows show. When tapped again you can go back to showing the normal number of rows.
To get the animation you need to use delete rows with index paths and animate it.

Subclassing custom UICollectionViewLayout to achieve certain deletion and insertion effect

The following is something that i wish to achieve.
We have a horizontal view that displays three items simultaneously.
when we click a button, the three items slide out of the view and are deleted. 3 more items are then created and are moved into the view to replace the previous 3 items.
we can keep on changing the items endlessly, even if there are only 4 items in total .
I was thinking of using collectionView to achieve this by subclassing the uicollectionviewlayout and use the following two functions.
initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:
finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:
but i am not able to do it.. Anyone has any idea on how i can go around to achieve this?
Thanks in advance!
Instead why don't you just use the horizontal flowLayout and update the data source for the collection view when the button is pressed and reload/insertCells with the moving out animation ?

require Customizing UIPickerView

I have a requirement where UIPickerView should be customised. The picker view should look adjacently like this!
[https://docs.google.com/drawings/d/1CHCBvB1IEebj82Xt1ZGBYTKhCUMBmeAeQBV5fvbI-6s/edit?usp=sharing
Any ideas on how to achieve this feat?
Don't use a picker view, you will break your head attempting to get it right.
Use a pair of ui table views, the left table cells correspond to right table sections. The right table sections are hidden until their respective, parallel row is selected
Sorry about formatting, on iPhone

iOS Keeping section titles anchored in Grouped Table Style

I am using a grouped table view to display items on a view controller.
I want anchor the section's title just like it happens with the plani styled table.
How could I do that?
Ah, I know what you mean, my answer is no, you don't think you will be able to do that in a simple way. You might be able to do that with some workarounds using custom UITableViewCells and custom UIView's as the section's titles. I guess that way you could achieve that.

Resources