for resizing my table I went with this solution in my tableview controller witch is perfectly fine:
[objectManager getObjectsAtPath:self.searchURLString
parameters:nil
success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
NSArray* results = [mappingResult array];
self.eventArray = results;
NSLog(@"Events number at first: %i", [self.eventArray count]);
CGRect newFrame = self.activityFeedTableView.frame;
newFrame.size.height = self.cellsHeight + 30.0;
self.activityFeedTableView.frame = newFrame;
self.cellsHeight = 0.0;
}
failure:^(RKObjectRequestOperation *operation, NSError *error) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:[error localizedDescription]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
NSLog(@"Hit error: %@", error);
}];
The resizing part is in a method but here is just so you can see it. Now the only problem I haveis resizing the scroll view in the other view controller as I have no idea when the tableview has finished resizing. At the moment I'm doing it with performSelector: afterDelay: but this is really not a good way to do it. Any ideas?