Aspects
Aspects copied to clipboard
can't access return value's property
Hi, here is my code:
[self aspect_hookSelector:@selector(initWithCoder:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> aspectInfo) {
__weak UINavigationItem *item;
NSInvocation *invocation = aspectInfo.originalInvocation;
[invocation invoke];
[invocation getReturnValue:&item];
if (item.title) {
UILabel *titleLable = [[UILabel alloc] init];
titleLable.textColor = [UIColor whiteColor];
titleLable.font = [UIFont systemFontOfSize:16];
[titleLable setText:item.title];
[titleLable sizeToFit];
item.titleView = titleLable;
}
} error:nil];
I can't step into if
statement, but po item.title
in console, I get the right value.