小编akb*_*eam的帖子

TPMultiLayoutViewController的ARC转换; 使用ARC不允许将Objective-C指针隐式转换为'const void*'

我正在尝试在使用ARC的项目中使用TPMultiLayoutViewController,但是碰到了以下错误: -

使用ARC不允许将Objective-C指针隐式转换为'const void*'

我真的不确定如何解决这个问题; 它需要明确转换吗?我该怎么做?

- (void)addAttributesForSubviewHierarchy:(UIView*)view associatedWithSubviewHierarchy:(UIView*)associatedView toTable:(NSMutableDictionary*)table {
    [table setObject:[self attributesForView:view] forKey:[NSValue valueWithPointer:associatedView]];

    if ( ![self shouldDescendIntoSubviewsOfView:view] ) return;

    for ( UIView *subview in view.subviews ) {
        UIView *associatedSubView = (view == associatedView ? subview : [self findAssociatedViewForView:subview amongViews:associatedView.subviews]);
        if ( associatedSubView ) {
            [self addAttributesForSubviewHierarchy:subview associatedWithSubviewHierarchy:associatedSubView toTable:table];
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

objective-c ios automatic-ref-counting

1
推荐指数
1
解决办法
2243
查看次数

标签 统计

automatic-ref-counting ×1

ios ×1

objective-c ×1