From the docs:
In the plain style, section headers
and footers float above the content if
the part of a complete section is
visible. A table view can have an
index that appears as a bar on the
right hand side of the table (for
example, "a" through "z"). You can
touch a particular label to jump to
the target section.
I find that very hard to grasp. First, this one:
if the part of a complete section is visible
What do they mean by this? This is paradox. Which one is it?
A) Table must be exactly the height of that section. If I have 5 Rows, and each row is 50px high, I must make it 5*50 high. The full section must be visible on the screen. Otherwise, if I have 100 rows but my table view is only 400 high, this will not apply. Nothing will float above my content. Sounds wrong.
B) It doesn't matter how high my table view actually is. Header and Footer is floating above the content and I can scroll the section. Makes more sense. But is completely against this nonsense making sentence: 'if the part of a complete section is visible'
And: What sense does it make when Section Headers / Footers float above the section content when there are multiple sections with Header / Footer? The user would have to scroll to death until reaching the end of first section, until the whole thing can move to the second section? Or could she drag the header / footer to move on?
Can anyone explain it better than they did?
It's easiest to explain through an example. Launch your Contacts app and scroll through your contacts. That's a UITableView with UITableViewStylePlain. The table has one section per letter. You can see the gray section headers "floating" above the table, meaning that once a section header reaches the top of the view, it remains in place while the table view scrolls underneath it. When the last cell from a section scrolls off the top of the view, the section header scrolls off the view along with it.
Related
how we could fixed the header on the right not on the top
like this
If you go into the Section Expert and select your header section you can enable the "Underlay Following Sections" property for the header section. This will allow the sections that follow to effectively print on top of the header section. At this point its a matter of designing the content of you header so that it does not extend beyond the point where you wish to end the left side section. Then when designing the content for the remaining sections be certain that nothing is placed on the left side of the sections where the header will be displayed.
Using this method will give the appearance you want in your output, but in truth, the header section and all other sections are still the full width of the page, its just up to you to control placement of your data fields and objects to ensure header section doesn't overlap with the other sections in ways that create undesired outputs.
i want to create a template for Libreoffice Writer which contains a right column for informations which should be displayed on all pages.
In fact i want a kind of page header on the right side.
Is there any way to solve my problem ?
You could use a text frame that's anchored in the header / footer. This way, you can place content on the same place on every page while that content doesn't need to keep inside the header / footer margins.
To do so, just activate header or footer, place the cursor inside it and select Menu Insert -> Frame. To keep the main page content apart from the "right column", just set the right page margin appropriately.
If the content that should appear in the "right column" is non-textual, you could also try to implement it as background image of the header / footer. AFAIK background images in header / footer aren't restricted to the header / footer area.
Background: I have implemented a standard tableView that has 4 sections. Each of the section contains a custom view for the header. Normally, the previous header will be pushed away when the header below is scrolled to the top of the tableView.
Question: Is it possible to prevent that "pushed out" behavior. I would like something along the line of "stacking" behavior. This is because I would like the user to have the full view of what headers are available. For example, if one scroll to the lowest cell, one will see all headers on the top of the tableView.
Additional Info: Please do not answer with hacks, for example, track the movement of the tableView, add the header view manually when needed, then resize the tableView.
It's not possible without using methods like you describe. At least not with the built-in table view.
One reason is that it just doesn't scale to arbitrary content. If you let section headers stack up what should happen when the entire screen is full of headers? How would the user be able to comfortably see and interact with the content under the 6th or 7th section when there is only a few pixels left to show the content because the rest of the screen is taken up by header for sections that the user is obviously not interested in.
You probably want to rethink your UI. Either go with the standard section headers, make some cool light-weight tabs, a custom harmonica control or something entirely different. Maybe even a hierarchical structure depending on the amount of content you want to present.
Requirement : implementing a drowdown functionality in an UIView
The known way is using a UIWebView.
My Q is can this be done via a TableView?
Is there any way which lets me select a section(just like selecting a row), so that I can implement a hide/show cells of a section when that particular section is selected?
Don't know if I am understanding you correctly, but it seems to me that what you want can be done like this:
have a UITableView with several sections;
each section has got just one row;
when a specific row for a section is selected (didSelectRowAtIndex), you change the data source associated to that section by adding more elements and reloadData on the table.
when a specific row for a section is selected you also modify the data source corresponding to any other section so that it only contains one row.
EDIT:
From your last comment, it seems to me that what you are trying to do is a generic dropdown menu: you click somewhere and it displays; now, in your specific case you are thinking of clicking on a table, but it could in principle be anywhere else. I am saying this (if I am not wrong), because if it is so, then you can find ready-made implementations, like WEPopover, and you could save some effort.
Going back to your asking, in the case you are mentioning, you can animate the height of the table view frame (or bounds), so that its content is displayed little by little, as the view height increases; have a look at this Tutorial about Core Animations.
In iOS, what do you call that element that attaches to the top of the screen when you scroll past it in a list (think the single letters in the Contact List). This is driving me nuts.
i'm not sure this is even a full question, but the answer is 'section'. If you're table style is plain, the section title will behave like the A-Z in the iPhone contacts screen
http://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableViewController_Class/Reference/Reference.html
It is the section header of a UITableView.
Its appearance depends on the tableview style.
Like in the contacts app, like header stay at the top of the section unless the top of the section is off the screen and there are rows in the section which are still visible.
Like in the settings app the header just appears as text on the striped background and scrolls with the table view no matter what. It doesn't ever get attached to the top.