Dynamic height of table is not set

vivek bhoraniya

I am trying to set dynamic height of table. But it is not working when I log height of table it is showing me dynamic height but not set to actual table.

Here is my code:

CGRect table_frame;
table_frame=table_sender.frame;
NSLog(@"table fram: %f",table_frame.size.height); //got table height 444
float height = [senderHistoryDataArray count]  * 40 +40 ; // 4*25.00
NSLog(@"height of table: %f",height);  //got this height 200
if(height>=444){
    table_frame.size.height=444;
}
else{
    table_frame.size.height=height;
    NSLog(@"height set");  //also displying this line in log
}

table_sender.frame=table_frame;
[table_sender reloadData];

Out Put: enter image description here

when I uncheck autolayout it will work but it is just showing more part than previous. enter image description here

bhavya kothari

if you are using AutoLayout then you can't set frames - if you do that you get wiered behaviour

Autolayout is sort of relative approach of placing UI components on screen. For e.g Stand 100px behind me and 20px from left boundary (here i have used pixel - you can think of as meters think of it as playground)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how to set my height to 100% with a dynamic table inside?

From Dev

jQuery set height of a div to the 'dynamic height' of another

From Dev

How to Set Dynamic Height jQuery

From Dev

Table with dynamic row height issue

From Dev

Highcharts dynamic height with table layout

From Dev

Table with dynamic row height issue

From Dev

Unable to set row height equal to table height

From Dev

How to set the height of table in mpdf

From Dev

How to set a dynamic height on content for each step?

From Dev

Dynamic reports -set width and height of report

From Dev

How to set dynamic height for rich:extendedDataTable rows?

From Dev

set Dynamic width and height of collection view cell

From Dev

set dynamic tableview height constraint in storyboard swift

From Dev

iOS - Set CollectionView Header with dynamic height

From Dev

How to set dynamic height with Visual Format Language

From Dev

HTML table dynamic height for one cell

From Dev

Changing height dynamic for Table Rows , CustomCell and Layout

From Dev

Dynamic Height of Cells in Table View Not Working

From Dev

How to set height constraint of UITableView according to dynamic height cells?

From Dev

Take in parent divs (dynamic) height, and set child div to same height

From Dev

Set height of UITableView which contain dynamic Cell Height

From Dev

display : table not take the dynamic height take their children height

From Dev

How to set table border less then cell height

From Dev

CSS Table set max row height

From Dev

Set cell height in PDF table created with itextsharp

From Dev

unable to set height of a table footer element in chrome

From Dev

How to set table height on chrome and firefox

From Dev

Angular Set Dynamic Height for element of his parent div

From Dev

How to set content area div height with dynamic header div

Related Related

  1. 1

    how to set my height to 100% with a dynamic table inside?

  2. 2

    jQuery set height of a div to the 'dynamic height' of another

  3. 3

    How to Set Dynamic Height jQuery

  4. 4

    Table with dynamic row height issue

  5. 5

    Highcharts dynamic height with table layout

  6. 6

    Table with dynamic row height issue

  7. 7

    Unable to set row height equal to table height

  8. 8

    How to set the height of table in mpdf

  9. 9

    How to set a dynamic height on content for each step?

  10. 10

    Dynamic reports -set width and height of report

  11. 11

    How to set dynamic height for rich:extendedDataTable rows?

  12. 12

    set Dynamic width and height of collection view cell

  13. 13

    set dynamic tableview height constraint in storyboard swift

  14. 14

    iOS - Set CollectionView Header with dynamic height

  15. 15

    How to set dynamic height with Visual Format Language

  16. 16

    HTML table dynamic height for one cell

  17. 17

    Changing height dynamic for Table Rows , CustomCell and Layout

  18. 18

    Dynamic Height of Cells in Table View Not Working

  19. 19

    How to set height constraint of UITableView according to dynamic height cells?

  20. 20

    Take in parent divs (dynamic) height, and set child div to same height

  21. 21

    Set height of UITableView which contain dynamic Cell Height

  22. 22

    display : table not take the dynamic height take their children height

  23. 23

    How to set table border less then cell height

  24. 24

    CSS Table set max row height

  25. 25

    Set cell height in PDF table created with itextsharp

  26. 26

    unable to set height of a table footer element in chrome

  27. 27

    How to set table height on chrome and firefox

  28. 28

    Angular Set Dynamic Height for element of his parent div

  29. 29

    How to set content area div height with dynamic header div

HotTag

Archive