Skip to content

为何RAC在tf框架的懒加载中TF_LAZYLOAD_OBJC_CUS无法被调用? #10

@Dast1Woop

Description

@Dast1Woop

TF_LAZYLOAD_OBJC_CUS(UIButton, gBtn4HideSelf, ^(UIButton *ins){
[ins setTitle:@"显示自我" forState:UIControlStateNormal];
[ins setTitleColor:[UIColor redColor] forState:UIControlStateNormal];

/** 下面方法不会被执行,即:rac不能在tf框架的懒加载中使用。 */

// [[ins rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
// ins.selected = !ins.selected;
// if(ins.selected){//正显示自我
// [self.view bringSubviewToFront:self.gV4PushPreview];
// [ins setTitle:@"隐藏自我" forState:UIControlStateSelected];
// }else{
// [self.view sendSubviewToBack:self.gV4PushPreview];
// [ins setTitle:@"显示自我" forState:UIControlStateSelected];
// }
// }];
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions