UISplitView and custom toolbar at bottom - objective-c

So I have a Split View controller and am trying to put a toolbar at the bottom of my root view programmatically. I am currently adding it to the bottom of the table using the [self.tableView setTableFooterView:toolbar]; method. This works fine getting the toolbar on the screen, but it is not anchored to the bottom of the view. It always appears after the last element in the table. How would I go about anchoring it to the bottom of the root view? Should I set the frame to the bottom of the view, and then add it as a subview to the rootview itself? Or can I just adjust the frame and leave it as a component of the TableFooterView? Thanks

You have the right solution in your question.
Set the frame of your toolbar to the bottom of your root view. Be sure and make sure it's the frontmost view by calling:
[myRootView bringSubviewToFront:myBarView];

Related

Animate view and set button backgroundimage conflict

I am making a type of drawer animation for iOS where a button tap in one of my views will expand that view over the other views from the bottom up. All is well, except when I want to change the button image after animation. The animation completes but then returns the view to its original position when setting the button image.
Things I have tried:
Using CGAffineTransformMakeTranslation instead of setCenter; this works perfectly, except I want to also add a panGestureRecognizer to interact with the drawer, present, and dismiss it. The transform doesn't seem to play well with this interaction
Adding the buttons programmatically thinking maybe AutoLayout is fussing with this
UIView beginAnimations as well as UIView animateWithDuration and completion block
Setting breakpoints and verifying that the movement of the view is reflected in the frame of the button before the image is changed; button frame is not still in original position, but has supposedly relocated with the view
It shouldn't matter, but my project is using TabBarController. I made a simpler version of what I'm trying to do with just the one view controller and had the same issue. The green view extends beyond the frame of the view controller's view so that when it moves up it reveals what is off-screen.
example: http://i.imgur.com/tRou0Js.png?1

view on top of tableview dissapears

I have a problem with my tableview. My first problem is that I have a tableview with a view on top. In this view there are 3 buttons. I am building this using story board.
My problem with this is that what I scroll down, my view disappears. How can I set this that this view always stays on top? At the moment you can see this view as the 'first cell'.
Kind regards
If you look at the view hierarchy on the left hand side you'll see that your header view is a subview of the table, so it scrolls with it.
From that hierarchy view drag it out of the table view so that it's at the same level.
Also, resize your table so that it starts underneath the view with the header bar.
Tim
What if you select your view in Interface Builder, then go to Editor->Arrange->Send to front?

Putting a toolbar directly under a navigation controller without hiding the content underneath the toolbar

I am trying to put a toolbar directly beneath a navigation bar but I need the toolbar to not hide the content from the view directly beneath it. My quick solution was to set the navigation controller's native toolbar to visible, which works and properly resizes the view beneath it so that it doesn't let anything hide behind it, BUT the default toolbar shows at the bottom of the screen.
I need it to be at the top, just under the nav bar. I figure the easy solution would be to change the frame of the default toolbar (which I don't know how to do) OR to position a new instance of the toolbar onto the view (which works but it hides the content beneath it) but have it resize the views below.
Please see the following image that I found to see what I'm trying to do. (note how the tableview's first row starts UNDER the tab bar)
Thanks!!!
You are confusing two things. The NavigationController toolbar property IS the bottom bar, any toolbar that you add to a view has nothing to do with the nav controller but is a property of that view.
If you have your own toolbar at the top of a view you need to move the rest of the view content down or set that toolbar to translucent if thats what your looking for.
Again the nav controller toolbar is always the bottom bar, the toolbar you drop in IB is just a toolbar for that view that you can put anywhere.
I don't believe you can change the frame of the default toolbar. You will need to create your own instance of a toolbar, position it at the bottom of the navigation bar and resize your tableView to fit below.
We can't see how you have your views set up but if you are starting with a view that is subclassed as UITableViewController you will have trouble doing that. What you want is to start with a UIViewController as your master controller, add a tableview and toolbar as subviews. Then position and size them as appropriate.
If you are hiding and showing the toolbar you will create a method to move it up under the navigation controller and again resize the tableview.

push view without showing tabbar removes bottom of view

I'm trying to push a view while hiding the uitabbar.
The view which is being pushed have another view inside it which is located in the bottom.
Whenever this view is pushed the uitabbar is not displayed (which is good) but the bottom view I added is not displayed.
how can I hide the tab bar but still show the view I added in the bottom?
Thanks!

Change view appearance inside a Popover?

How do you change the appearance of your views inside a popover? Say I have Master-Detail with a top search bar that is gray in horizontal view, but when it's in vertical view inside a popover, I want it to be glossy black to match the popover appearance.
Where would I put this code?
I am tempted to put it in didRotateFromInterfaceOrientation or shouldAutorotateToInterfaceOrientation or willRotateFromInterfaceOrientation.
Anyway, since no one has any opinion, I ended putting it inside willRotateFromInterfaceOrientation and seems to be working fine.