![]() Var myLoader = WavesLoader.showProgressBasedLoaderWithPath(myPath)Ī feature that I LOVE from PaintCode is that you can import an. The only thing we have to do here is extract the CGPath from the UIBezierPath like so: let myPath = starPath.CGPath StarPath.addLineToPoint(CGPointMake(139.1, 49.88)) StarPath.addLineToPoint(CGPointMake(180, 82.6)) StarPath.addLineToPoint(CGPointMake(220.9, 49.88)) StarPath.moveToPoint(CGPointMake(180, 25)) In the case of drawing a star, it is going to give us this code: //// Star Drawing In this case we can use it to create BezierPaths, and extract from there the CGPath. You can just draw things, and it will automagically create the code for you PaintCode is a realy powerful Mac app that can do a lot of things. Manually let path = CGPathCreateMutable()ĬGPathMoveToPoint(path, nil, 0, height/2)ĬGPathAddLineToPoint(path, nil, width + 100, height/2)ĬGPathAddLineToPoint(path, nil, width + 100, height*2)ĬGPathAddLineToPoint(path, nil, 0, height*2).How to create my own CGPath? :warning: The CGPath bounds cannot exceed the bounds of the loaderView: To manually add FillableLoaders to your project you just need to copy the Source folder files. Carthage github "poolqf/FillableLoaders" ~> "1.3.0".It will automatically fire an animation to update the loader fill progressīackground of the loader view (transparent by default)Īlpha of the loader view (1.0 by default)Ĭorner radius of the loader view (0.0 by default)ĭuration of the animations (10.0 by default)īool to indicate if the loader has to swing when going up (small rotation, not available for the Plain loader)Įxtra property for Spikes and Rounded loaders: Indicates if the loader movement is progress based or not (Default: false) Just call the method removeLoader() and the loader will disappear and will also be removed from its superview.Īpart from being able to customize the loader shape, you can also customize other properties of the loader. createProgressBasedLoaderWithPath(path:onView:). ![]() showProgressBasedLoaderWithPath(path:onView:).Var loader = WavesLoader.createLoaderWithPath(path)Īll the methods wave the variant version where you can pass it the view in which you want to add the loader: ![]() Var loader = WavesLoader.createProgressBasedLoaderWithPath(path) If you want to create the loader, and not show it at the same moment, you can use createProgressBasedLoaderWithPath(path:) or createLoaderWithPath(path:) to create it, and when you want to show it, just call showLoader() So, it is just a helper method to do everything at once. ShowLoaderWithPath(path:) or showProgressBasedLoaderWithPath(path:) are going to call the create one, and after it, are going to call the showLoader() method. ShowProgressBasedLoaderWithPath(path:), createProgressBasedLoaderWithPath(path:), showLoaderWithPath(path:) and createLoaderWithPath(path:) There are four main methods to create the loaders:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |