nicklockwood/SwipeView

- (void)setFrameForView:(UIView *)view atIndex:(NSInteger)index need judge self.window?

c-xiaoqiang opened this issue · 1 comments

I use a tab bar. swipeView added in the first controller and set swipeView auto scroll. Then use a timer to scroll it.When I go to second controller,the timer is still work,but when page change,the self.window is nil. When I back to first controller.It will cause the swipeView show empty?
How can I fix it?

Same usage pattern here. I can call reloadData while on the other tab, so self.window == nil and frames are not updated. As a result needed view is not displayed.

Here is a PR that introduces this: #70
I'm not sure which crash author was expecting to heal with it but if it only appears at ios 7.0 then maybe use __IPHONE_OS_VERSION_MIN_REQUIRED can help?