dzenbot / DZNEmptyDataSet

A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display
https://www.cocoacontrols.com/controls/dznemptydataset
MIT License
12.09k stars 1.73k forks source link

Custom View always show at x = 0 #140

Open macbaszii opened 9 years ago

macbaszii commented 9 years ago

As you can see from this photo

img_0884

I use a custom view for empty data set while loading the data and It always align at x = 0

How to fix it ? Thank in advance.

dzenbot commented 9 years ago

Which version are you using?

macbaszii commented 9 years ago

@dzenbot 1.7.2 :)

dzenbot commented 9 years ago

Would you mind posting a snippet of your custom view's implementation? Sweet design bw!

macbaszii commented 9 years ago

@dzenbot sure, I'm just using activityIndicatorview while loading

screen shot 2558-09-30 at 8 20 02 pm

cashmash commented 9 years ago

same issue

macbaszii commented 9 years ago

@dzenbot Do you figure it out ? Just remind, Thanks.

dzenbot commented 9 years ago

I haven't been able to repro using UIActivityIndicatorView at least:

- (UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView
{
    UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    [activityView startAnimating];
    return activityView;
}
macbaszii commented 9 years ago

@dzenbot yeah! there is no problem when using UIActivityIndicatorView.

I have looking this and the code is normal. weird T-T https://github.com/gontovnik/DGActivityIndicatorView/blob/master/DGActivityIndicatorView/DGActivityIndicatorView.m

cashmash commented 9 years ago

try reproducing it with a custom UIView init with frame....