How i hide the header and footer of UITableView Controller? - iphone

I develop an application in which i selected the UITableView (only two row) having group style on the UIViewController with background image. But i want to be only those two row of the group table shold be displayed on the background image, and the header and footer of the table must be hide.
How i do that?
alt text http://file:///Users/Nikhilesh/Desktop/image.png

EDIT2 - OK, now I think that what you really want is to make the background of the table view transparent so that your background image is visible. This is answered in another question on SO, give that answer a try. These questions here and here explain how to use your own image for the background of the table view.

Related

how to create a sectioned TableView for profile in iPhone

I saw this picture on Internet:
the section with the add Photo Frame and two rows (First, Last)...
How do you achieve a design like that!!!
I only know how to make rows (static and dynamic) in xCode using the full width of the screen but not in a single section but not making such a divisiĆ³n and adding a frame out of the other two rows
my designs are like this
Any help I'll appreciate
thanks in advance
It's not really clear that the example you've given is actually embedding the first, last part into a table view. It could just as easily be a single cell that has embedded views with borders to look like rows. Here are a few ways I see to accomplish the view you've given.
Have them be actual rows - but use a custom cell layout that offsets the 'First' and 'Last' labels to be further to the right. Then create a UIImageView for the profile that sits on top of the UITableView cells, but inside of it. Basically insert it as the first subview of the UITableView. It should cover the top left of those top two cells. You can do this since those cells have a static known hight and you've set the left offset. Another option would be just inserting it into your top cell, but having it overflow the bounds and setting clipsToBounds = NO.
Make the entire top view a custom UIView that uses CALayers or CoreGraphics to manually draw the lines and layout such that it looks like part of the table view. Set that as the TableView header, or the first section Header.
There are a lot more things you can do like changing frame layout as well.
you can achieve this with the use of xib read carefully and if you don't understand anything you can ask me again it's bit tricky
in you xib create a UIView and design for your photo and firstname, lastname cells with the use of textfields image views and all and then take a UITableView.
now drag your UIView and drop it on your UITableView so that it will be considered as your table header and your first section now will be as you designed like photo with firstname and lastname fields.
i've done this in manier projects of mine so hope this way you can also do this thing and ask me if you need any help.

UIScrollview header

i am creating a book store Application,so i am showing books in a scroll view with background image(shelf image),i have added bouncing functionality to scroll view,i am adding buttons with book images to scroll view like grid in 4x3 thumbnails
when i scrolled to top the background image is repeating with those shelfs,its ok for me
but when i dragging(bouncing) Scroll view to down its repeating same shelf on the top
so how can i add any header to Uiscrollview to show like Apple ibooks
Can any one help me ..thx in Advance...
If you want to add a header, designate a table view delegate (can be the same as your data source) and give it the methods tableView:viewForHeaderInSection: and tableView:heightForHeaderInSection:. From the first one you return the view you want as the header. The second one is obvious.
I'm not sure if that will solve your problem, because I'm not sure I understand your problem or how you propose to solve it.

Cannot freeze the table header while scrolling the rows? [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Some Gap remains between Table Top and Table Header only when table loads and scrolled down to the last row?
I am using Xcode.
self.mytable.tableheaderview=label;
By this code I can get the header but I can not freeze it...plz help
The best thing to do is create a UIViewController which is a UITableViewDelegate and UITableViewDataSource, and have a UILabel at the top of the UIViewController's nib, and a UITableView underneath the UILabel. This will have the effect of having the UILabel staying put in its position, with the UITableView still able to scroll like normal. Hope that Helps!
This question sounds a like one I just answered here. All you should have to do is set yourTable.bounces = NO; in your viewDidLoad function. Either that or uncheck the "Bounces" option in the NIB if you used Interface Builder to layout your table.
What do you mean by freezing? If what you think is to stop it from scrolling while scrolling the rows of the table, I don't think its possible. See the table header is part of the table view and is designed to scroll along with the rows. If you just want a header that is static, dont make it a table header. Just add a view or label separately and place it above the table view. The table view will then scroll below that.

Where do I start to create a "Contact Info" page/table?

I want to create a view in my app where the user can contact me. At first glance I can see it's a grouped table view, but I'm unsure about the top part?
How do I get the Logo/Thumbnail there along side the big text and small text?
- I'm assuming it's a custom tableview cell?
Also, what about adding the buttons into a table cell? all evenly spaced apart? Would this also be through a custom table view cell? (designed in IB)
One last thing, is how would I put these two cells in with the rest?
My guess is that the green image and the three buttons on top (call, email, visit website) are all subviews of the table's header view. You can easily do that, if you go to Interface Builder and drag a UIView to the top part of your UITableView.
Then, you will need custom cells for the next part of the interface. One easy way is to make them all in IB and then create outlets and hook them to your table. Read the Table View Programming Guide for iOS regarding more alternatives for custom cells. If you need more customization, start from this excellent article. Finally, regarding the bluish rounded background of number "20", have a look at this SO question. Good luck!

UITableView like Contact App

I try to create an UITableView similar to the Standard Contact App, when selecting a contact (i.e. grouped style). But how do I get some controls at the top or at the bottom of the cells, which scroll with the rest? In the Contact App you have at the top the picture together with the name and at the bottom three buttons. Are these just special customized Cells? Or can you have controls directly there?
Thanks for your help!
Regards
Matthias
I played with table header/footer views. You can create them in IB and assign them to
self.table.tableHeaderView = yourHeaderView;
self.table.tableFooterView = yourFooterView;
Needless to say, that you customize them as your wish.
Another option is to customize a table cell view for the section 0 if you have a grouped style table. You can add there a picture and a button, whatever you want.
In both cases all your elements will scroll with the table view.
Is that what you asked for?
When I did this functionality, I used a combination of UIViews and UITableViewCell.
As a header I inserted UIView, and it placed the UIButton (with picture) and UITableViewCell. After laying a transparent UIView and subscribe to UIControlEventTouchUpInside, which highlight the cell ([self.tableHeaderCell setHighlighted:YES];)