UITableview Not Scrolling?

I use the following code in the cellForRowAtIndex method, but the tableview does not scroll?

 static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView1 dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; } cell.textLabel.adjustsFontSizeToFitWidth = YES; cell.textLabel.text = [NSString stringWithFormat:@"...%@...", hit.neighboringText]; return cell; 
+4
source share
6 answers

try this, this will clear your problem.

 self.myTableView.bounces = YES; 

check this message in more detail

0
source

Look at xib and do it. Check out the image below.

enter image description here

+7
source
 self.tableView.autoresizingMask = UIViewAutoresizing.FlexibleHeight; 

That should solve the problem!

+3
source

In the method below, return the number of rows more than the ones you see in the device / simulator:

 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // return 12; } 
0
source

you must declare the delegate of the table attribute as self:

self.miTableView.delegate = self

You can do this in the viewDidLoad function.

Remember to go to UITableViewDelegate

0
source

None of this helped me. Finally, I just add

 self.miTableView.reloadData() 

in ViewDidLoad () ... and everything works.

Maybe because I use

  self.miTableView.rowHeight = UITableViewAutomaticDimension 

maybe reboot after necessary ... hope this helps

0
source

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


All Articles