I’m trying to use TPMultiLayoutViewController in a project using ARC, but am bumping into the following error:-
Implicit conversion of an Objective-C pointer to ‘const void *’ is disallowed with ARC
I’m really not sure how to tackle this; does it need explicitly converting? and how would I do that?
- (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];
}
}
}
You’re getting the error because of this:
Since
valueWithPointer:takes aconst char *. You can work around this by doing what @ user1139069 suggested: