UIProgressView how to make it circular - ios

I'm moving the first passes with iOS programming. I want to make a progress bar circular, can someone tell me how to make it?

from my opinion thats quite a task for a beginner to handle.
I would try to deal with this issue like this:
Using core graphics to draw myself three circles: inner for data, outer for background and one in between for the loader itself. Then i would modify the loader circle to display the progress.
This should help you a lot: http://www.raywenderlich.com/33193/core-graphics-tutorial-arcs-and-paths
I would rather though use the docs: https://developer.apple.com/library/ios/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211-SW1

Related

Is there a way to overlay frames in SpriteKit?

As the title states, is there a way to stop the canvas / SKScene from clearing the contents of the current frame, and just draw over the current frame? Now the contents of the scene/frame are cleared every update cycle, i would like to just draw over the previous frame.
I have worked with OpenFrameworks and other visual programming frameworks, and the way it worked there was; you draw stuff on the update call, on the next update call you set a background again to 'clear' the previous frame.
I have looked through the whole documentation of SpriteKit and couldn't find anything. I also tried to emulate the effect by pushing more nodes onto the scene, having them follow one step behind the 'new' nodes. This was, as i expected, way to heavy on CPU / RAM.
No code, i know, i'm sorry, but the stuff i use is pretty basic. Any one of you have any thoughts on this?
Hope to hear from you, thanks.
You should be able to do this by setting the clearsContextBeforeDrawing property on your SKView to NO.
clearsContextBeforeDrawing is a property of UIView, which SKView is a subclass of.
I wouldn't consider this to technically be Sprite Kit providing the behavior, but I believe it's what you're looking for.
Note: I didn't actually test this, so it's possibly that this won't actually work. It would theoretically work perfectly for UIKit.

How to animate NSAttributedString?

I need to animate the color and scale of an attributed string. CATextLayer does not work for me, because it can only change the foreground color for plain strings..
I found another solution, but I did not get it to work either Link
I need to get it to work on both Mac and iOS.
I think layers would be ideal, because I can do the scaling there easily..
Do you have any ideas?
If you need to animate a property that is not animatable, you can use CADisplayLink. That allows you to create your own animation by executing a method every time the screen refreshes. Although it looks sort of low-level, it is not really difficult to implement it.
You can find tutorials/examples on the web easily.
Note: It does not trigger your method periodically, therefore do not assume anything about timing and keep a counter and calculate progress your animation by yourself. Apart from that, CADisplayLink is cool.
Edit: As Max pointed out, CADisplayLink is not available for Mac. But there is CVDisplayLink, I guess you can achieve the desired animation by that. For more info on CVDisplayLink, you can have a look at that answer by Brad Larson.

SVProgressHUD iOS8 Replace circle with animation

My Developer is using SVProgressHUD to show loading screen. Is it possible to replace the circle with image animation (a sequence of images)
Using Ashish's suggestion of GifHUD is fine but you could use the UIImageView's animationImagesAPI. You should be able to just set the images and the duration to get the effect you are looking for. Doing so would reduce your 3rd party dependencies from 2 to 0 which is always a win in my book.
This is a question to ask "your developer", not a question to ask the community. Modifying the 3rd party library or implementing custom functionality like this is always possible, but if it should/could be done is dependent on many circumstances.
To directly answer your question, you can just replace the centered animation with a UIImageView and load a series of images into it and start animating it. This is not a difficult task at all. Implementing this into the current library means complications with future maintenance alongside possible other issues.

How to make a flowing ribbon background for iOS like the one on PS3?

I've started playing with animated background views in iOS, and I really think it improves the presentation of my app. However, I'd like to create a background that I don't know how to make. The effect I'm looking for is something like this:
activeden.net/item/green-ribbon-animated-banner-background/49229
http://i156.photobucket.com/albums/t34/pspelver/wallpaper.jpg
I'm not sure how to actually design the graphic for this kind of pattern, or if there is even a better way to do it with core graphics. Can anyone please advise? Thanks.
Try to find (or create yourself) an animated image of what you want. You could probably just find or make a video of the effect you want and do a frame-by-frame change into something like a .gif. Then set that as your background. The problem I see with the effect you want is that it will probably take a lot of system resources.

Getting started with animations

I am trying to create an animation in which a circle will be containing some text or image inside it, when user will tap on circle, the circle will reveal its child circles, which will be containing some details in text form. This is something similar to discovr app http://discovr.info/. I am totally a newbie in graphics and animation world. I have read several post & documents like where to start with animations, opengl, core animation, cocos2d etc, but still don't know how should I start working on this application. I will be really grateful if you can help me in getting stating up this project. Please also tell me where else I should look for resources.
Thanks in advance,
Regards.
Great start for CoreAnimation (if you don't want to read whole Apple documentation) could be this tutorials by Mike Nachbaur (4 parts):
Animating Interfaces with Core Animation: Part 1
Animating Interfaces with Core Animation: Part 2
Animating Interfaces with Core Animation: Part 3
Animating Interfaces with Core Animation: Part 4
When new iOS trainees in my job are starting to learn CA I often give them this tutorials because everything is clearly explained there.
There are some great guides in the Apple developer library.

Resources