citadelind
asked on
How to display NSMutableArray Value in Table
2012-04-06 16:25:47.998 Smart Buddy[1521:f803]
( "Request A Quote" )
2012-04-06 16:25:47.999 Smart Buddy[1521:f803]
( "Contact US" )
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
How to bind above data in UITableView?
I want to display both records display in table, my code is
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIde ntifier:Ce llIdentifi er];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewC ellStyleDe fault reuseIdentifier:CellIdenti fier];
}
NSUInteger row = [indexPath row];
cell.textLabel.text =[formData objectAtIndex:row];
// Configure the cell...
cell.accessoryType = UITableViewCellAccessoryDe tailDisclo sureButton ;
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
formdata is my NSMutableTableArray
Please give me solutions.
Thanking you..
return cell;
( "Request A Quote" )
2012-04-06 16:25:47.999 Smart Buddy[1521:f803]
( "Contact US" )
--------------------------
How to bind above data in UITableView?
I want to display both records display in table, my code is
--------------------------
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIde
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewC
}
NSUInteger row = [indexPath row];
cell.textLabel.text =[formData objectAtIndex:row];
// Configure the cell...
cell.accessoryType = UITableViewCellAccessoryDe
--------------------------
formdata is my NSMutableTableArray
Please give me solutions.
Thanking you..
return cell;
In the cellForRowAtIndexPath method, NSLog your formData array. Perhaps it is nil at that time, and that is why your textLabel's text property is not receiving anything? Could you post where you initialize the formData object as well?
ASKER
i attached my code
Please check it where is made mistake?
Thanking you..
Please check it where is made mistake?
Thanking you..
Could you post where you initialize the formData object as well?
ASKER
I attached doc file, whole my code,
Please check it
It will be initialize the formdata
Thank you
code.doc
Please check it
It will be initialize the formdata
Thank you
code.doc
In your cellForRowAtIndexMethod, add an NSLog with the formData array. Like so:
From there, see if anything is outputted to the console. If not, you know that formData contains nothing when your table is requesting it.
NSLog(@"%@",formData);
From there, see if anything is outputted to the console. If not, you know that formData contains nothing when your table is requesting it.
ASKER
yes it is return below value
2012-04-06 16:25:47.999 Smart Buddy[1521:f803]
( "Contact US" )
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
but i have 2 output soap result and when i check this event so it will show 2 output
-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
if( recordResults )
{
[soapResults appendString: string];
[formData addObject:soapResults];
NSLog(@"%@",formData);
}
}
it will give output this
2012-04-06 16:25:47.998 Smart Buddy[1521:f803]
( "Request A Quote" )
2012-04-06 16:25:47.999 Smart Buddy[1521:f803]
( "Contact US" )
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
In formdata add 2 value through soap response, but in my table it will bind only last
value "Contact Us"
How to bind both value in my tableview??
Thank you...
2012-04-06 16:25:47.999 Smart Buddy[1521:f803]
( "Contact US" )
--------------------------
but i have 2 output soap result and when i check this event so it will show 2 output
-(void)parser:(NSXMLParser
{
if( recordResults )
{
[soapResults appendString: string];
[formData addObject:soapResults];
NSLog(@"%@",formData);
}
}
it will give output this
2012-04-06 16:25:47.998 Smart Buddy[1521:f803]
( "Request A Quote" )
2012-04-06 16:25:47.999 Smart Buddy[1521:f803]
( "Contact US" )
--------------------------
In formdata add 2 value through soap response, but in my table it will bind only last
value "Contact Us"
How to bind both value in my tableview??
Thank you...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nothing to get anyvalue i put in loadview
Give me proper solution what i do? so both value display on table?
it bind only last value, do not clear my why it takes last value?
Request A Quote
Contact US
Both value bind in table.
Give me solution
Thank you..
Give me proper solution what i do? so both value display on table?
it bind only last value, do not clear my why it takes last value?
Request A Quote
Contact US
Both value bind in table.
Give me solution
Thank you..
ASKER
Thanks i got solution......