Xcode 5 - viewing a static table is not displayed on the simulator

I use a storyboard. Although the static view of the table appears inside the storyboard, it does not appear on the simulator after launch. To be more precise, only the section title appears. If I change the style to dynamic, a table view will appear!

+6
source share
1 answer

There are probably 2 reasons.

Firstly, you are not using the UITableViewController in the storyboard, i.e. you have a UITableView inside a UIViewController. I am sure you should use the UITableViewController if you want to use static cells.

Secondly, you created the UITableView instance correctly, but you have implemented the programmatic management functions in the UITableView delegate. Specifically, these features include at least:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 

If this is not the case, I think you need to provide more information.

+6
source

Source: https://habr.com/ru/post/955453/


All Articles