Adding a button in the bottom of a TableView - iphone

I'm trying to add a button on the bottom of a TableView, without any success.
The idea isn't to use the tableFooterView property, as that doesn't show the button in a fixed position.
My idea is more along the lines of the Facebook application's Notifications bar on the bottom.
I'm using Three20.
Any pointers on how I can achieve this?
Thanks

Just add button to the view below your tableview but ensure your table height is less than the position you are adding the button,this way your can scroll table above button & your button will always be visible

Just embed custom view over your tableview.i mean on the bottom of tableview.so the tableview will scroll and the view don't.

Add a UIView as the footerView and then add the UIButton to the UIView.

Related

View with uitableview, tabbar and more objects

I'm developing an app and I need a view with these elements:
- UITableView
- UITextField and UIButton
- TabBar
As you can guess, I am developing a chat, but when I put the elements in the .xib, I can't show de layer: UITextField and UIButton. If I put them without a view, they dont appear.
If I put a view under the table, and in that view I put the text and the button I get this error: http://pastebin.com/CKfxijz9 (I put the error there because it's to long)
Thanks in advance
There are some ways of dealing with that, depending on how it should behave. Some of them are:
Provide a table footer or header view that holds the button and
the text field.
Nest the table view into another view. The table
view and the view containing the button and text fielt are on the
same level within the view hierarchy. They are rather siblings than
sub- and superview to each other.
Use a UISlider instead of a table. (However, I personally would use the table.)
Here's an approach I've used in the past (not sure if it's best practice, but it works).
Add your button and textfield to a new view (let's call it, bottomView)
Add bottomView to the superview of your tableview
Set the frame of your bottom view so that it fits to the bottom of the screen (this will make it so your tableview will scroll, but keep your bottomView always attached to the bottom of your mainview)

How to add facebook like icon in detail view?

I am working on a navigation based app. every cell has a detail view. i have textView in detail view which shows details of selected cell. is it possible to add a facebook like icon in the end of textView? and if no then how should i do that. thanx in advance.
You can put the icon after the textview, or you can overlay it on top of the textview. It's as simple as putting it there in interface builder:
or, just set the frame properties of the text view and the image view to overlap, and place the image view on top of the text view (simplest way is just to "addSubview" it 2nd, which will place it on top).

Changing the size of UISearchBar

Not being able to find the answer, and also not being able to do what I want with this:
CGSize searchBarSize = self.searchDisplayController.searchBar.frame.size;
searchBarSize.width = <someNumber>;
I ask: is there a way to change the width of a UISearchBar?
Thanks a lot.
Just as a reference to anybody with the same problem:
I created a view with the searchBar image (resized) as a button's background (the button was added as a subview to my view).
Then I defined the view containing the button as the view for the table's header in my UiTableViewController.
The button, when pressed, behaves like the searchBar.
I was able to solve my problem.

When and where should I add a view to a UITableView's footer?

I am populating a UITableViewController's UITableView through code only. At the bottom of the table I wish to position a button that scrolls into view as the user scrolls to the bottom of the table.
When in the UITableViewController life cycle should I populate the table footer with a button? viewDidLoad?
p.s. I wish to avoid using section footers in the UITableView.
Yes, viewDidLoad is the correct place. It's not a stone-set rule though - I have change footer view in many different situations, such as after rotation in didRotateFromInterfaceOrientation.
Note that the view will be repositioned to location immediately below the last row, so if you want to provide a margin or centering for your button I suggest adding a plan UIVIew as footer, and then add your button(s) into that UIView.
Yes, put it in viewDidLoad. Here is some sample code.
You can just set the tableFooterView property of a UITableView to your button.

UITableViewController with a UIPickerView sliding up the screen

I have a UITableView where a cell needs to be filled in with a date by selecting it through a pickerview. Instead of pushing the pickerview onto the navigationController I would want to let it slide up halfway into the screen with the tableview still visible in the upper half of the screen. I've seen some apps doing this neat effect before but I don't see on how to accomplish this.
Anyone some helpful hints on this ?
I did this a little while back and asked about it.
I ended up doing exactly what the highest voted answer says: Put the UIPickerView in the same View as your other items and animate the sliding motion using UIView's beginanimation method.
Add a done button in your tool bar. Add a new target/action to the button to call a method on the UIViewController that has your table view and picker controller. Then have it animate the view back off the screen using a UIView animation block.