How to keep UITableView contentoffset after calling -reloadData

I was having trouble with this because I mess with cell sizing in my cellForRowAtIndexPath method. I noticed that the sizing information was off after doing reloadData, so I realized I needed to force it to layout immediately before setting the content offset back. CGPoint offset = tableView.contentOffset; [tableView.messageTable reloadData]; [tableView layoutIfNeeded]; // Force layout … Read more

UITableView + Add content offset at top

I’m not sure if I’m following you but I think I’m having the same predicament. In my case I must give some space to the ADBannerView at the top of the screen so what I did was in the viewDidLoad method I added: [self.tableView setContentInset:UIEdgeInsetsMake(50,0,0,0)]; the values it takes are UIEdgeInsetsMake(top,left,bottom,right). Alternatively the same with … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)