MONActivityIndicatorView icon indicating copy to clipboard operation
MONActivityIndicatorView copied to clipboard

indicator is not placed in center of view

Open metrue opened this issue 9 years ago • 9 comments

following is my configuration, but the indicator is not placed in center of view actually.

    self.indicatorView = [[MONActivityIndicatorView alloc] init];
    self.indicatorView.delegate = self;
    self.indicatorView.center = self.view.center;
    self.indicatorView.numberOfCircles = 7;
    self.indicatorView.radius = 5;
    self.indicatorView.internalSpacing = 3;
    self.indicatorView.duration = 0.5;
    self.indicatorView.delay = 0.5;

metrue avatar Apr 05 '15 12:04 metrue

add some layout constraints for centering the view

mownier avatar Apr 08 '15 07:04 mownier

Same problem here, after last update...

MattiaConfalonieri avatar Apr 13 '15 07:04 MattiaConfalonieri

See example here on placing the indicator at the center of a certain view.

mownier avatar Apr 14 '15 06:04 mownier

Adding constraints works here but we should absolutely be able to center the indicatorView with coordinates. This is a pretty major issue.

edalford11 avatar Jun 09 '15 14:06 edalford11

The 0.3 update made this pod useless for my app, can't center without constraints

jonathancaouette avatar Jul 22 '15 12:07 jonathancaouette

Same problem with centering. To many efforts to make it centeret. Think it major enough drawback.

mikelodoss avatar Aug 12 '15 09:08 mikelodoss

Same problem

AllDmeat avatar Aug 18 '15 05:08 AllDmeat

I face the same problem, can not place it in the center.

mayqiyue avatar Oct 09 '15 14:10 mayqiyue

An easy solution to this problem is:

activityIndicator.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activateConstraints([
            activityIndicator.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor),
            activityIndicator.centerYAnchor.constraintEqualToAnchor(view.centerYAnchor)
        ])

gtokman avatar Apr 16 '16 19:04 gtokman