Wenn ich ReactiveCocoa
verwenden, ich möchte meinen tableView
‚s Rahmen beobachten, aber es kommt ein Problem:iOS: Gebrauchte Typ ‚CGRect‘ (auch bekannt als ‚struct CGRect‘), in dem arithmetischen oder Zeigertyp erforderlich ist
__block CGRect tmp_rect;
[RACObserve(self, self.tableView.frame) subscribeNext:^(id x) {
NSLog(@"%@",x);
tmp_rect= (CGRect)x; // this line appear issue:
'Used type 'CGRect' (aka 'struct CGRect') where arithmetic or pointer type is required'
double width_radio = x.origin.x/[UIScreen mainScreen].bounds.size.width;
back_nav.alpha = 1 - width_radio;
}];
Ich weiß nicht, was dieses Problem erscheint.
Was ist CGRext? Ich habe noch nie davon gehört. Was ist das Ergebnis des NSLog? – Fogmeister
Es tut mir so leid, ich habe meine Frage bearbeitet. – aircraft
Keine Sorge. Was ist das Ergebnis des Nslog in der ersten Zeile des Blocks? – Fogmeister