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

  • SEARCH
  • Home
  • 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 8334695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:26:17+00:00 2026-06-09T03:26:17+00:00

i have a custom UITableviewCell xib, connected with my uitableview, and i’ll do it

  • 0

i have a custom UITableviewCell xib, connected with my uitableview, and i’ll do it in this way:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"MyCell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    [[NSBundle mainBundle] loadNibNamed:@"MyCustomCell" owner:self options:nil];

    cell = myCell;
    self.myCell = nil;
}

[self configureCell:cell atIndexPath:indexPath];
return cell;
}

then when change the orientation of the device, i want change the position of some element in my custom UITableViewCell so in this method:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {

if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {

    CGRect myframe = CGRectMake(600, self.arrowLabel.frame.origin.y, self.arrowLabel.frame.size.width, self.arrowLabel.frame.size.height);
        self.arrowLabel.frame = myframe;
} else {

    CGRect myframe = CGRectMake(400, self.arrowLabel.frame.origin.y, self.arrowLabel.frame.size.width, self.arrowLabel.frame.size.height);
        self.arrowLabel.frame = myframe;
}
}

i change the frame.origin.y and frame.origin.y of my arrowLabel connected with my UITableViewCell xib but change only the position of the last row of the tableview, the other label in the other row remain in the same position, so my question is how i can reload the table view?…i have also tried with [self.tableview reloadData];…but don’t work…any idea?

  • 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-09T03:26:19+00:00Added an answer on June 9, 2026 at 3:26 am

    You may want to try putting the frame change codes in your cellForRowAtIndexPath. Basically in that method you have something like:

    if (portrait) {
        // use portrait frames
    } else {
        // use landscape frames
    }
    

    And then in your willRotate method you can call [tableView reloadData].

    Edit:

    - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    
    for (UITableViewCell *cell in [tableView visibleCells]) {
    
        if (portrait) {
            CGRect myframe = CGRectMake(600, cell.arrowLabel.frame.origin.y, cell.arrowLabel.frame.size.width, cell.arrowLabel.frame.size.height);
            cell.arrowLabel.frame = myframe;
        } else {
            CGRect myframe = CGRectMake(400, cell.arrowLabel.frame.origin.y, cell.arrowLabel.frame.size.width, cell.arrowLabel.frame.size.height);
            cell.arrowLabel.frame = myframe;
        }
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom UITableViewCell that I use like this: AppTableCell *cell = [tableView
I have found this code for a custom UITableViewCell : UITableViewCell *cell = [tableView
I have custom UITableViewCell . It contains UITextLabel . When I press this cell
I have a custom UITableViewCell. In its function - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier, I need
I have a uitableview with custom uitableviewcell. To hide keyboard user should scroll up
I have created a UITableView with a custom UITableViewCell . My cell includes one
I have a UITableView with custom cells that were defined in the xib file,
I have a custom UITableViewCell created in IB. All my cells will have this
I have a project with a custom UITableViewCell (cell.h/.m/.xib) that has 2 labels (labelMain/labelSub),
I have a custom UITableViewCell that has a UISegmentedControl object. My UITableView (questionnaire form)

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.