objective c - Read two tables from database in sqlite in one grouped table view -


i have equations list in app , want have grouped table view load 1 table sqlite database first section of table view , load table sqlite second section of table view. ok know how create , read database app delegate , sqlite tables 2 arrays hold content. know how load 1 table sqlite table view in xcode, still have few questions. how set rows in database sections of table view? possible load multiple tables databse 1 grouped table view?

i new iphone development, upto knowledge can not have multiple tables in 1 grouped table view.

you can use if conditions or switch cases application decide sections , rows.

as m giving example of if condition request type integer.

- (nsinteger)numberofsectionsintableview:(uitableview *)tableview  

{ // return number of sections.

if(requesttype == 2)  {     return [arraycitynames count]; }else {     return 1; } return 1; 

}

  • (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { // return number of rows in section.

    if(requesttype == 1) { return 1; }

    if(requesttype == 2) { return 2; } if(requesttype == 3) { return 1;

    } else { // return number of rows in section. return 1; }

    return 0; }


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -