1

I am in a need to show same style like a tab bar controller provide(button with image).
But the need is i need to implement the tab bar on the tableview controller.



How should i suppose to do this ?

i want to add three buttons on the bottom of tableview controller like the tab bar controller.

image

Parv Bhasker
  • 1,773
  • 1
  • 20
  • 39
  • Can you provide a more detailed question on what you want to achieve? Maybe add an image. – Dejan Skledar Aug 31 '17 at 10:39
  • basically i want to add three buttons on the bottom of tableview controller like the tab bar controller. – Parv Bhasker Aug 31 '17 at 10:42
  • You can do that by adding three buttons in the bottom of your tableview controller. – iPeter Aug 31 '17 at 10:44
  • it is a tableview controller , this is what the problem is , when ever i add anything it was directly added to tableview – Parv Bhasker Aug 31 '17 at 10:45
  • I think Taking `tableview` inside a `viewcontroller` will be the best solution for you, then you can easily add three `buttons` at the bottom of your `viewcontroller` by decreasing the height of your `tableView`. – iPeter Aug 31 '17 at 10:53
  • yes its a good idea but i'm working on an already written code and previous developer used the tableview controller. – Parv Bhasker Aug 31 '17 at 11:10

1 Answers1

2

Click on your tableview controller, then at the top click on editor then Embed in and select Tab bar controller, or if you don't want to embed your controller into a tab bar, drag and drop a bar button item.

Bar button

  • drag and drop a bar button added the button in the tableview. I need button at the bottom on view – Parv Bhasker Aug 31 '17 at 11:21
  • @ParvBhasker check the image I added to the answer.. is that what you want or am I misunderstanding your question –  Aug 31 '17 at 11:35
  • yes, but i have to show image above the button text too. and i guess bar button can show either the image or the text. – Parv Bhasker Aug 31 '17 at 11:52
  • @ParvBhasker or try this ...https://stackoverflow.com/questions/18844681/how-to-make-custom-uibarbuttonitem-with-image-and-label –  Aug 31 '17 at 13:21
  • 1
    i just used the seperate tab bar on uiview controller to resolve the issue – Parv Bhasker Sep 01 '17 at 12:59