1

I've a UIView - containerView.

I have a table view controller - aTableViewController.

I'm trying to add the table view into the table view controller using:

[containerView addSubview:aTableViewController.tableView]; 

But there isn't anything in the containerView. Hmm...

2 Answers 2

1

The code looks correct. Ensure that all of containerView, aTableViewController and the tableView are initialized properly. Try printing them out just before this line and ensure they are not nil

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, you are right. i should have checked if they are nil.
1

Make sure that when you are initialising aTableViewController with – initWithFrame:style: the frame property is set correctly.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.