mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix iOS7 introducing new sub-widgets in the widget tree, which broke a whole lot of 'superview' calls.
This commit is contained in:
parent
2c246cba5e
commit
929aa2fac3
7 changed files with 15 additions and 11 deletions
|
|
@ -870,7 +870,7 @@ static const int contactSections[ContactSections_MAX] = {ContactSections_None, C
|
|||
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
|
||||
UIView *view = [textField superview];
|
||||
// Find TableViewCell
|
||||
if(view != nil && ![view isKindOfClass:[UIEditableTableViewCell class]]) view = [view superview];
|
||||
while(view != nil && ![view isKindOfClass:[UIEditableTableViewCell class]]) view = [view superview];
|
||||
if(view != nil) {
|
||||
UIEditableTableViewCell *cell = (UIEditableTableViewCell*)view;
|
||||
NSIndexPath *path = [self.tableView indexPathForCell:cell];
|
||||
|
|
|
|||
|
|
@ -495,7 +495,10 @@
|
|||
|
||||
- (void)selfUpdate {
|
||||
UITableView *parentTable = (UITableView *)self.superview;
|
||||
if(parentTable) {
|
||||
|
||||
while( parentTable != nil && ![parentTable isKindOfClass:[UITableView class]] ) parentTable = (UITableView *)[parentTable superview];
|
||||
|
||||
if(parentTable != nil) {
|
||||
NSIndexPath *index= [parentTable indexPathForCell:self];
|
||||
if(index != nil) {
|
||||
[parentTable reloadRowsAtIndexPaths:[[NSArray alloc] initWithObjects:index, nil] withRowAnimation:false];
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
if(chat != NULL) {
|
||||
UIView *view = [self superview];
|
||||
// Find TableViewCell
|
||||
if(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
while( view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
if(view != nil) {
|
||||
UITableView *tableView = (UITableView*) view;
|
||||
NSIndexPath *indexPath = [tableView indexPathForCell:self];
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ static UIFont *CELL_FONT = nil;
|
|||
if(chat != NULL) {
|
||||
UIView *view = [self superview];
|
||||
// Find TableViewCell
|
||||
if(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
while(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
if(view != nil) {
|
||||
UITableView *tableView = (UITableView*) view;
|
||||
NSIndexPath *indexPath = [tableView indexPathForCell:self];
|
||||
|
|
|
|||
|
|
@ -340,7 +340,8 @@
|
|||
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
|
||||
UIView *view = [textField superview];
|
||||
// Find TableViewCell
|
||||
if(view != nil && ![view isKindOfClass:[UIEditableTableViewCell class]]) view = [view superview];
|
||||
while(view != nil && ![view isKindOfClass:[UIEditableTableViewCell class]]) view = [view superview];
|
||||
|
||||
if(view != nil) {
|
||||
UIEditableTableViewCell *cell = (UIEditableTableViewCell*)view;
|
||||
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
if(callLog != NULL) {
|
||||
UIView *view = [self superview];
|
||||
// Find TableViewCell
|
||||
if(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
while(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
if(view != nil) {
|
||||
UITableView *tableView = (UITableView*) view;
|
||||
NSIndexPath *indexPath = [tableView indexPathForCell:self];
|
||||
|
|
|
|||
|
|
@ -83,16 +83,16 @@ static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWi
|
|||
// Auto found position
|
||||
//
|
||||
|
||||
UIView *view = [self superview];
|
||||
// Find TableViewCell
|
||||
if(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
|
||||
UIView *view = [self superview];
|
||||
while( view != nil && ![view isKindOfClass:[UITableView class]] ) view = [view superview];
|
||||
|
||||
UIView *cellView = [self superview];
|
||||
// Find TableViewCell
|
||||
if(cellView != nil && ![cellView isKindOfClass:[UITableViewCell class]]) cellView = [cellView superview];
|
||||
UIView *cellView = [self superview];
|
||||
while( cellView != nil && ![cellView isKindOfClass:[UITableViewCell class]] ) cellView = [cellView superview];
|
||||
|
||||
if(view != nil && cellView != nil) {
|
||||
UITableViewCell *cell = (UITableViewCell*)cellView;
|
||||
UITableViewCell *cell = (UITableViewCell*)cellView;
|
||||
UITableView *tableView = (UITableView*)view;
|
||||
|
||||
if([tableView style] == UITableViewStyleGrouped) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue