Code Monkey home page Code Monkey logo

monactivityindicatorview's Issues

indicator is not placed in center of view

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;

Implement intrinsicContentSize

Please implement this method as follows and call invalidateIntrinsicContentSize instead of adjustFrame. This way it plays well together with iOS auto-layout.

-(CGSize)intrinsicContentSize
{
    return CGSizeMake((self.numberOfCircles * ((2 * self.radius) + self.internalSpacing)) - self.internalSpacing, self.radius * 2);
}

The issue I'm having is that I can't center the view horizontally using layout constraints without knowing the exact width of the view. With intrinsicContentSize implemented, it would layout automatically.

Sometimes it doesn't work

Hi~

Sometimes circles of indicatorView are not visible.

In order to find out to cause of this problem, I modified the code " [circle setTransform:CGAffineTransformMakeScale(0, 0)];" into " [circle setTransform:CGAffineTransformMakeScale(1, 1)]; in "- (void)addCircles" method.

As a result, circles are always visible but sometimes there is no animation.

I don't know why exactly this has happened.

Thank you for reading this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.