Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8273481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:30:05+00:00 2026-06-08T07:30:05+00:00

I need to pass an string value from UItable View Controller to Uitable view

  • 0

I need to pass an string value from UItable View Controller to Uitable view cell

Here is the code which i used
In my Table view controller

#import <UIKit/UIKit.h>
#import "CustomCell.h"

@interface DetViewController : UITableViewController
{
NSString *urlstring;

CustomCell *cust;

}

@property(nonatomic,retain)NSString *urlstring;
@property(nonatomic,retain)NSMutableArray *mutarray;

@property(nonatomic,retain)CustomCell *cust;
@end

and im TableViewController.m have

- (void)viewDidLoad
{
[super viewDidLoad];  
 url=[NSURL URLWithString:urlstring];

urldata=[[NSString alloc]initWithContentsOfURL:url];
mutarray=[[NSMutableArray alloc]init];

self.mutarray=[urldata JSONValue];



 NSDictionary *dict=[mutarray objectAtIndex:0];

self.title=[dict valueForKey:@"category"];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
CustomCell *cell =(CustomCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {
    cell = [[[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

}

cell.custurlstring=urlstring;
NSLog(@"%@", cell.custurlstring);
return cell;
}

In my Custom Tableviewcell.h have

#import <UIKit/UIKit.h>

@interface CustomCell : UITableViewCell{
NSString *custurlstring;


}
@end

My custom Tableviewcell.m have

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {

  NSLog(@"%@",custurlstring);
}
return self;
}

Now i got the string content in tableviewcontroller by using NSLog..but if i tried to print the value in TableViewCell i cant get those values…
Guidance Please…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:30:07+00:00Added an answer on June 8, 2026 at 7:30 am

    No need of customizing a cell for displaying a image and labels on it,
    Just add them in normal cell

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString *CellIdentifier = @"MyCell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {        
        cell = [[CustomCell alloc] initWithStyle:<style enum value> reuseIdentifier:reuseIdentifier string:urlstring]
        //cell.mystring = self.mystring;
    }
    
    // customize your image and your labels here with rects here
    
    
    UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"yourimage.png"]];
        [cell.contentView addSubview:image];
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(your rect here)];
    [cell.contentView addSubview:label];
    
    return cell;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to pass a url string from the view to the controller, a
I need to pass a string value from Form1 : public void button1_Click(object sender,
I want to pass the string value which I get from the textarea into
I have a small issue: I need to pass the value of string from
So I have a flashobject which I need to pass a formatted DateTime string
I need to compare two value (date) from query . String myFormatString = yyyyMMdd;
I need to pass (via string content of a HTTP request/response body) name value
I need to pass a value from the onload event of a user control
I've CSV string 100.01,200.02,300.03 which I need to pass to a PL/SQL stored procedure
I need to pass a string literal to a function myfunction(arg1 DEF_CHAR arg1); now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.