1
這是我的代碼的一部分。UIView框架設置錯誤,查看得到{nan,nan}起源。
NSLog(@"fr: %@", NSStringFromCGRect(frame_)); NSLog(@"org: %@",
NSStringFromCGPoint(frame_.origin)); // cell.frame = frame_; [cell
setFrame: frame_];
NSLog(@"c: %@", cell); NSLog(@"c frame: %@",
NSStringFromCGRect(cell.frame));
打印輸出令人驚訝。任何人都有這個想法嗎?幫助和感謝。
[657:707] fr: {{350, 600}, {175, 300}}
[657:707] org: {350, 600}
[657:707] c: <JXUIGridViewCell: 0xf62d3c0; frame = (nan nan; 175 300); tag = 4010; animations = { position=<CABasicAnimation: 0x15b4a0>; bounds=<CABasicAnimation: 0x15b540>; }; layer = <CALayer: 0xf62d400>>
[657:707] c frame: {{nan, nan}, {175, 300}}
你沒有說你如何得到**框架**。你可以顯示該代碼嗎? – Jim
我不記得如何獲得'frame_'。 NSLog打印輸出是如何工作的,以告訴'frame_'中的內容。對 ? – Juguang
你能解決這個問題嗎?我目前擁有相同的代碼,並且不知道我的代碼出了什麼問題。 – Alexandre