You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this great plugin. I'm facing a strange problem when using setCustomView though.
I try to load a custom view from a xib file using this code:
// Getting the views from the xib fileNSArray *subviews = [[NSBundlemainBundle] loadNibNamed:@"MiscViews"owner:niloptions:nil];
for (UIView *subview in subviews) {
if ([[subview restorationIdentifier] isEqualToString:@"Loading View"]) {
// Creating a new view
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 150)];
// Adding the subview form the xib to this view
[view addSubview:subview];
// Setting the new view as the view for the loading state
[self.tableView.pullToRefreshView setCustomView:subview forState:SVInfiniteScrollingStateLoading];
}
}
But when the state is loading, the app freezes. From my researches, it's because layoutSubviews (from UIScrollView+SVPullToRefresh) is called repeatedly. Not sure why this happens, and my capacities to debug on Objective-C are kind of limited. I know this doesn't happen when I'm just creating a UIView directly from the code, without using a xib.
Has anyone been facing this problem before or has any idea why this happens?
The text was updated successfully, but these errors were encountered:
Hey Sam,
Thanks for this great plugin. I'm facing a strange problem when using setCustomView though.
I try to load a custom view from a xib file using this code:
But when the state is loading, the app freezes. From my researches, it's because layoutSubviews (from UIScrollView+SVPullToRefresh) is called repeatedly. Not sure why this happens, and my capacities to debug on Objective-C are kind of limited. I know this doesn't happen when I'm just creating a UIView directly from the code, without using a xib.
Has anyone been facing this problem before or has any idea why this happens?
The text was updated successfully, but these errors were encountered: