-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hello Developer,
Good job on the responsive label code to detect links , below is my code in the cellForRowAtIndexPath definition snippet for reference.
Can help me why the line where the urlTapAction is assigned to enableURLDetectionWithAttributes call parameter stops my dealloc.
I have tried to put the items in background and all still doesn't works.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//Do background work
dispatch_async(dispatch_get_main_queue(), ^{
PatternTapResponder urlTapAction = ^(NSString *tappedString) {
[self performSelectorOnMainThread:@selector(openWebViewWithUrlString:) withObject:tappedString waitUntilDone:YES];
};
//Update UI
[message enableURLDetectionWithAttributes:
@{NSForegroundColorAttributeName:[UIColor blueColor],NSUnderlineStyleAttributeName:[NSNumber numberWithInt:1], RLTapResponderAttributeName:urlTapAction}];
});
});
Comment this line and the dealloc gets called.
[message enableURLDetectionWithAttributes:
@{NSForegroundColorAttributeName:[UIColor blueColor],NSUnderlineStyleAttributeName:[NSNumber numberWithInt:1], RLTapResponderAttributeName:urlTapAction}];
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels