How to adjust the height of my tableView when my dropdown menu is clicked? - ios

I have a implemented a drop down menu above my UITableView and when I click on it I want my table view to go down inside the items of my drop down menu, because right now when I click on my drop down menu, the tableview stay where it is..
i have a view above my prototype cell that contain my drop down menu but I can't put any constraints on it... when I click in "filtre" I want this to happen : image description here

it looks like you added a Table Header view. it is a little different than common UIView.
Instead of changing Height constraints, you'd better to change the frame of the headerview
how-to-set-the-height-of-table-header-in-uitableview
In addition, you can found good codes of dropdown implementation from these links.
https://github.com/qmathe/DropDownMenuKit
https://github.com/onmyway133/Dropdowns

Related

Scroll one page up in UITableView

I have a big list of items displayed using UITableView, having variable heights.
Suppose first visible item is item #1000, how can I programmatically scroll exactly one page up?
Or how can I scroll up %80 of height?
Select your tableview from interface builder. in attribute inspector check paging enable under the scrollview.
refer below screenshot!

iOS UITableView header with sticky menu

I want to create a UITableView with an collapsable view on top and a sticky menu. To show what i exactly mean i made 3 images:
I thought i will make a UITableViewController and place a view above the table but i dont know how to implement the sticky menu.
Whats the best way to accomplish that?
Don't use a UITableViewController, you won't be able to add anything besides the table view.
You should use a standard UIViewController, with a top view housing the sticky menu, and a UITableView below it.
You can open/close the menu by using autolayout: your sticky menu has a "fixed height" constraint, and the table view has no "top" constraint, but a "vertical spacing" constraint between the sticky menu and itself.
Just animate the constant for the "height" constraint of the menu to have a collapse/expand animation.
You should add a table Header for Sticky menu.

XCode 6 Table View cell running off the screen

I have a table view cell inside of a view controller in Xcode storyboard. The cell is formatted 'Right detail' with a Title on the left and Subtitle on the right. It looks like the cell is too wide for the screen - and the Subtitle information has rolled off the side of the screen. I'm on Xcode 6. The table view looks like this
But it should look like this
Is there some formatting option I could check so that the information fits neatly in the table view screen? Thanks for any advice.
Open the resolve layout issues tab at the bottom right, above where the debug panel goes and select Reset to suggested constraints with your tableview selected. If that doesn't work then you'll need to constrain the right side of your tableview to the superview manually, this can be done by control dragging (like an IB connection) from the superview to the tableview and selecting the appropriate constraint in the scene hierarchy to the left of your storyboard editor.

How to make the dropDown in a UITableViewCell clickable without clickin the next cell and without adjusting the height of the cell?

I have DropDown class (the custom dropDown menu which is a tableViewController)
It is working (tested and used in other classes)
Then I have a PersonalInfo Class..
my PersonalInfo class is a TableViewController containing custom cells
Each cell has a UIView dropDownView and a textField contentTextField.
making the DropDown a subview of dropDownView, I'm able to make the dropDown menu appear on each cell. However, when the dropDown goes beyond the height of the cell, the dropDown items are not clickable anymore but they're still visible.
If i make the cell's height larger it works fine, but I want to keep the cell's height at a certain size.
I tried bringing views to front, never worked.
Can anybody help me? I'm running out of ideas..
thanks
With the drop-down being a subview to your cell, you can only control the content within that cell (I think...). From an "Apple Human Interface Design Guide" perspective, your approach is probably a bit unusual.
Firstly, you wouldn't really need every single cell to have a drop down, right? I mean, even if you have a drop-down menu within a cell, you'd only display one drop down at a time, and not multiple ones. So you could make the drop down a sub-view of the table. Or, more aligned with the standard approach, you would have a drill-down view that loads the drop-down / subtable into the current table, similar to all the tutorials on table views.
Hope this helps,
da_h-man

Dock an item on top of UITableView like imdb app on ipad?

I want to do something similar to the left UITableView on imdb app on ipad.
Once you have selected an item, it will become the first item on the top and it will dock there. When you flick the list below, it will always be there.
Anyone has any suggestion on how I can achieve that?
That's not part of that UITableView.
It is a seperate UITableView with a custom UITableViewCell that is actually the same as in the UITableView with all the information about the selected film or character ...
When no film is selected, that second UITableView isn't visible. But as soon as you select an item, that UITableView at the top will become visible with the information about the selected item. That means that you will have to reduce the height of the UITableView (with the detail info about that item) so that the UITableView at the top will get some space for being displayed. Everytime you change the item, you need to update the UITableView using the general delegation and datasource methods for a table view. Once there's nothing selected, you just set the upper table view to hidden, and set the other table view's height to the full height.
That's all.

Resources