ios bug

Bug: ios7中使用UISearchDisplayController进行搜索 输入内容然后滑动searchResultsTableView然后取消 再次点击搜索 输入内容之后点search 然后在取消 这样重复几次UISearchDisplayController的contentSize就会不正确的能向下滑动很长

Solution:

1
2
3
4
5
#pragma mark - UISearchDisplayDelegate
- (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView {
tableView.contentInset = UIEdgeInsetsZero;
tableView.scrollIndicatorInsets = UIEdgeInsetsZero;
}

Bug: Right aligned UITextField spacebar does not advance cursor in iOS 7
FXForms/issues/106

Solution:

1
2
3
4
5
6
7
8
9
10
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
// only when adding on the end of textfield && it's a space
if (range.location == textField.text.length && [string isEqualToString:@" "]) {
// ignore replacement string and add your own
textField.text = [textField.text stringByAppendingString:@"\u00a0"];
return NO;
}
// for all other cases, proceed with replacement
return YES;
}

Bug: UITableViewCell textLabel offset

Solution:

1
2
3
//in Cell.m file
self.indentationLevel = 0;
self.indentationWidth = 0;

Bug: Why is detailTextLabel not visible?

Solution:

1
2
3
4
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
cell.detailTextLabel.text = @"some words";
[cell setNeedsLayout];
[cell layoutIfNeeded];