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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:18:12+00:00 2026-05-23T10:18:12+00:00

I´m trying to display a UITableView as a subview of a UIView. When I

  • 0

I´m trying to display a UITableView as a subview of a UIView.

When I trigger the action below, the view is shown but contain no data.

- (IBAction)youwin
{     
    UITableView *HSView = [[UITableView alloc] initWithFrame:CGRectMake(200,200,500,600)] ;
    [self.view addSubview:HSView];
}

It looks like the code in the HSView.m file is not triggerd.

The HSView.h is imported into the main controller.

What am I missing?

  • 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-23T10:18:12+00:00Added an answer on May 23, 2026 at 10:18 am

    Few problems in your code are :–

    1. You are leaking memory as the memory management calls are not balanced. You will need to release the instance you’ve created after adding it as a subview.
    2. When creating an instance of UITableView, you need to set the delegate and dataSource properties for the it to work properly. dataSource object is the one that provides the content and without it you will get an empty table view.
    3. You are mentioning HSView.h so I am thinking HSView is a class. In that case UITableView *HSView is incorrect. If you wanted to instantiate HSView then do HSView * hsView = .... If it is a subclass of UITableView, point 2 will hold for it too.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

just created an UITableView, trying to display some custom data from an array, but
I tabController app with uitableview getting NSURLconnection data and trying to display it. I
trying to display data only after variables have been set. $(document).ready(function () { function
I am trying to display data that I am getting from server through json.
I am trying to display all possible values for a sub-property. Below I am
I'm currently trying to implement a editable details view using a grouped UITableView. I'd
here's my issue, i'm trying to create a UITableView that is able to display
I am trying to implement a Core Data backed UITableView that supports indexing (eg:
I am trying to display a custom TableView on a UIViewController but am getting
I have a View that I want to display a UITableView in and animate

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.