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 6899319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:24:26+00:00 2026-05-27T07:24:26+00:00

I have to develop an iPad TV guide that looks like What’s On TV

  • 0

I have to develop an iPad TV guide that looks like
What’s On TV.

I tried to do it using a UITableView with many row as the number of channels. In order to create a kind of grid, I added a subview for each row that contains all the programs (UIButton with different size). In order to scroll the view horizontally I added gesture recognizer and change the UIView (subview cell) position every time I swipe right or left.

That works, but the solution seems to me a bit messy and the animation is not so reactive. Do you have any idea (or example) for a better solution? What about html5?

Thanks

My code:

in ViewController.m

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {


   static NSString *CellIdentifier = @"Cell";
   UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

   [cell setSelectionStyle:UITableViewCellSelectionStyleNone];

   _chName = (UILabel *)[cell viewWithTag:4];
   _chName.text=((Channel *)[_resultEPGChannel objectAtIndex:indexPath.row]).name;

   _viewCell = (UIView *)[cell viewWithTag:2];
   _viewCell.frame=CGRectMake(-_positionView, 0,2000, 77);

  //add the view to the _viewCell (moving view) with the right program for each channel (row)
  cp = [[ChannelProgram alloc] init] ;
  cp.allProgram=[_resultEPGProgram objectAtIndex:indexPath.row];

  [_viewCell addSubview:cp];

  return cell;}

In ChannelProgram.m (subclass of UIView)

 - (void)drawRect:(CGRect)rect{

    int xPoint=2;

    for (Program *singleProgram in allProgram) {

        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

        button.backgroundColor=[UIColor lightGrayColor];

        [button setTitle:singleProgram.title forState:UIControlStateNormal];
        button.frame=CGRectMake(xPoint,0, singleProgram.lengthProgram,75);
        [self addSubview:button];
        xPoint = xPoint+singleProgram.lengthProgram+2;}

The animation it’s very slow, and become worst every time I had to reload the table. What’s wrong?

  • 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-05-27T07:24:26+00:00Added an answer on May 27, 2026 at 7:24 am

    Event drawRect is own draw, every time redraw you will create new UIButton, so you may get a lot of UIButton far more than you need.

    UIButton is a control, you can just add it to ChannelProgram at - (id)initWithFrame:(CGRect)frame or - (id)initWithCoder:(NSCoder *)aDecoder, this will not cause any memory waste.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple game that I am building in as3/air using flash develop,
We are using Monotouch to develop an application that is specific to the iPad,
I want to develop an ipad app for babies, i have noticed that when
I have a iPhone app and want to develop iPad app with the same
I have been trying to develop an app for my ipad which i can
I've been asked to develop a website for the iPad. It's going to have
So we already have a web service that was develop a long time ago.
We are considering using PhoneGap for an iPad application that we are developing. We
As I'm just starting to develop an iPad application & have started getting used
I'm using Titanium to develop an Android/Ipad app. I can't find the exact dp

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.