How do I remove title and detail placeholder labels and its row from a table? - swift

After much searching through the net (and Xcode), I haven't found any way of how to remove the title and detail placeholder labels and its containing row from a table view in a today widget. See picture below:
Today Widget Interface Builder Screenshot

Select the cell and change Style to Custom

Related

How to create an expandable and collapsable menu WITHOUT a tableviewcontroller

I have a question. I am trying to create an expandable FAQ menu without using a tableviewcontroller. The reason I don't want to use a tableview is because I don't want expandable cells, rather, I want a buttonclick to reveal a label while also sliding down any other buttons on this page.
I'm using Swift in Xcode 7.3
If anyone has any suggestions/knows of a tutorial/a forum post, it would be greatly appreciated.
Thank You.
Sure,nyou could use buttons, and either change constraints on label heights or dynamically add labels. That's a lot of effort and code.
Or, you could use a table view and one of the myriad guides. Remember that table views don't have to be selectable on ever row, and they don't have to display row separator lines (UI).
Indeed you could disable selection on all rows and add buttons to some rows, though I'd personally say that's overkill and why require the user to be 100% accurate with the tap on a button which in your sample image doesn't even look like a button.

How to Add/delete rows in grid view

I need to add/delete rows like gird as show in the below screenshot. My intention is to add "Name" and "Mark" to the grid one by one. By default the grid should show only three items. Once the grid exceeds three rows it should be in scroll. I used "Scroll view" for this but I face below problems while implementing this.
1) How to add the items to the grid onnce I enter "Name" and "Mark" and press the "Add" button?
2) How to control the grid height to show only "three" items by default?
3) How to make scroll after "three items" added to the grid.
Can some one provide me code snippets or any sample projects to startup as below screen-shot.
https://github.com/slysid/iOS
Hope this is what you are looking for. It is not 100% done but it will do the job. I have used UITableview and a subclass of UITableview cell to make the view scrollable. You can find the source code in above link.
Bharath
You can find sample project at https://github.com/slysid/iOS
Bharath

How can I create a vertical separator bar between a form's Label and Field implemented in UITableView?

I am trying to implement a form much like the iPad's Data Plan Registration form. I am having a problem creating the vertical separator between my form's Labels and Fields. In the example below I'm trying to implement the vertical field/label separator in each section. Thanks for any help. I've searched the forums and looked at lots of tutorials, but have found none that address this specific question.
My Example will be weak since I'm not allowed to post an image...
Using UITableView...
---------------------------------------------
First Name | UITextField
---------------------------------------------
Last Name | UITextField
---------------------------------------------
Thanks again for reading this post.
GuyT
Per the recommendation from M42 I wanted to provide the answer that I used for my question.
My solution comes by using UITableViewCellStyle set to Custom. To implement a custom layout, first you will need to create a PNG image 5px x 200px to create a vertical separator line. When creating the image, be sure to choose a line color that will match the UITableView Cell Lines. Once created, add the PNG file to your project and then customize the cell layout by adding a UILabel, a UIImageView and a UITextField. Set the UIImageView's image property to the image you created. Be sure the image view reaches the top and bottom edge of your cell lines.

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.

How do I create a rounded table with controls in the cells?

I'm exploring the iPhone SDK and want to create and use a UI component like the figure below. A rounded table with cells in which each cell can have some label text, maybe an input text field and an action button that would take it to the next screen. The table should not be screen filling.
But... I can't figure out how to do it or find example code. The 'Table View' always seems to result in a screen filling table and although the 'Table View Cell' looks like what I need I can't find any good examples. I'm sure it's all not that hard, but I just can't find it. Any tips, pointers are appreciated.
(This figure is just an example of the sort of UI component I'm looking for, I'm not build something related to flight tracking...)
Table like component http://gerodt.homeip.net/table_ui_component.png
Gero
Try looking at the "5_CustomTableViewCell" project of the TableViewSuite code sample from Apple. It should how to create custom subclasses of UITableViewCell.
The short answer is, as alluded to above, you'll want to subclass UITableViewCell and add your custom UI elements to it. For the example you provided, you'd want two different types of cells; one with a label (in light blue) and content (in black) for 4 of your cells, and then a more complex one with additional text on the right.
You want a Grouped style table, which has sections with rounded elements as you lay out instead of filling the screen.
You also want custom table cells, which you can search here to find example code for.
As mentioned by other answers, what you want is a grouped TableView with custom UITableViewCells. Take a look at the Table View Programming Guide, in particular this section on table view creation and this section on custom cells.