How to resize the UITableView row height in Objective C

Hrithika S

In my app I have a requirement like saving the data in itemsArray in the following format like

iPhone
iPad
iPod Touch

and the same data I am tryin to display in the UITableView

but it is taking only the first item i.e iPhone

It is not displaying the remaining items in the itemsArray.

I have been trying this but I am not able to find the solution for it.

Can anyone please help me to solve this.

I am new to Objective C.

Thanks in Advance.

iPhone

If you want all 3 items in single cell then create one dictionary as follows:

NSMutableArray * contentsArray = [NSMutableArray array];
NSMutableDictionary * allContacts = [NSMutableDictionary dictionary];
for(int i = 0; i < yourItemArrayCount; i++) {

    [allContacts setObject:[yourItemArray objectAtIndex:i] forKey:@"key %@",[[youtItemArray objectAtIndex:i] stringValue]];

}
[contentsArray addObject:allContacts];

then in following method

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
        //Write your dictionary logic here

      NSDictionary *dict = [contentsArray objectAtIndex:indexpath.row];
      //Necessary logic will go here.
}

Add following method in your code

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 60; //You can set height of cell here.
}

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 resize the row height of a UITableView automatically in xamarin ios

From Dev

How to resize row height in C1FlexGrid?

From Dev

Objective-C UIWebview and UITableView scroll height

From Dev

how resize Android ListView row height

From Dev

how resize Android ListView row height

From Dev

Objective C setup auto row height in code

From Dev

How to resize input box in UIAlertViewStyleLoginAndPasswordInput of Objective C

From Dev

How to resize action sheet? objective C

From Dev

How To have UITableView Resize when only 1 row

From Dev

How to do stop scrolling uitableview if new rows are not there in uitableview in objective c?

From Dev

How to set UILabel height dynamically in Objective c?

From Dev

Resize UITableView Height (embedded inside UIScrollView)

From Dev

UITableView default row height Xcode

From Dev

How to resize the height of a TabControl?

From Dev

UITableView deleting row reduced table row height

From Dev

Set row height of a UITableView according to the cell in that row

From Dev

How to resize the textview along with toolbar according to the content in objective c

From Dev

How to resize UITableView in Today Extension

From Dev

Objective-c How To Segue from within a UITableView Sub Class

From Dev

How to resize the height in Tabhost in android

From Dev

How to resize height of the Dijit TimeTextBox

From Dev

How to resize height of the Dijit TimeTextBox

From Dev

Dynamic UITableView row height using UIStackView?

From Dev

Accessing the Row Height in Dynamic UITableView Prototypes

From Dev

iOS UITableView resize height / cant scroll down issue

From Dev

How to dynamically set the height of a UITableView?

From Dev

How to set height of UITableView programatically

From Dev

How to increase the single row height without reloading UITableView or individual cells [Swift]?

From Dev

UITableView: automatically set height for the row and fix it with max height constant

Related Related

  1. 1

    How to resize the row height of a UITableView automatically in xamarin ios

  2. 2

    How to resize row height in C1FlexGrid?

  3. 3

    Objective-C UIWebview and UITableView scroll height

  4. 4

    how resize Android ListView row height

  5. 5

    how resize Android ListView row height

  6. 6

    Objective C setup auto row height in code

  7. 7

    How to resize input box in UIAlertViewStyleLoginAndPasswordInput of Objective C

  8. 8

    How to resize action sheet? objective C

  9. 9

    How To have UITableView Resize when only 1 row

  10. 10

    How to do stop scrolling uitableview if new rows are not there in uitableview in objective c?

  11. 11

    How to set UILabel height dynamically in Objective c?

  12. 12

    Resize UITableView Height (embedded inside UIScrollView)

  13. 13

    UITableView default row height Xcode

  14. 14

    How to resize the height of a TabControl?

  15. 15

    UITableView deleting row reduced table row height

  16. 16

    Set row height of a UITableView according to the cell in that row

  17. 17

    How to resize the textview along with toolbar according to the content in objective c

  18. 18

    How to resize UITableView in Today Extension

  19. 19

    Objective-c How To Segue from within a UITableView Sub Class

  20. 20

    How to resize the height in Tabhost in android

  21. 21

    How to resize height of the Dijit TimeTextBox

  22. 22

    How to resize height of the Dijit TimeTextBox

  23. 23

    Dynamic UITableView row height using UIStackView?

  24. 24

    Accessing the Row Height in Dynamic UITableView Prototypes

  25. 25

    iOS UITableView resize height / cant scroll down issue

  26. 26

    How to dynamically set the height of a UITableView?

  27. 27

    How to set height of UITableView programatically

  28. 28

    How to increase the single row height without reloading UITableView or individual cells [Swift]?

  29. 29

    UITableView: automatically set height for the row and fix it with max height constant

HotTag

Archive