This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to let a view rotate forever?
Hi everyone I would like to know if it is possible to move an image round in a circle with a timer. FOr example make it moves arround a circle with a timer that everytime it display a new position to the image. How can I do this please ? sorry for my english I'm french :/
make an anchorpoint for the image to rotate around? sorry you didnt provide alot of information....
This website covers exactly how anchor points work and how you can get an object to circle around that point http://www.qcmat.com/understanding-anchorpoint-in-cocos2d/
Related
This question already has answers here:
How to change center of gravity in sprite kit game?
(2 answers)
Closed 7 years ago.
I am new in Swift Programming and I am using SpriteKit.
Is there anybody knows how to set the gravity of the world to the center of the screen which all my sprites will fall to the center of the screen?
Or is it possible to configure it? Any help? Thanks in advance.
You can use SKFieldNode for this purpose
Code example
// create grav field
let field = SKFieldNode.radialGravityField();
// center on X-axis
field.position.x = size.width/2;
// center on Y-axis
field.position.y = size.height/2;
// add to your world
addChild(field);
This question already has answers here:
There's a shadow on my button
(3 answers)
Closed 9 years ago.
BTW. it may seem like duplicate of question about button shadow problem, but they have monotone background, in my case background is some image so simple border does not fix the problem.
While making app for iPhone/Pad I noticed that:
UIButton shows up with a white gap or line on the bottom if background is not white.
Any suggestions?
Cannot get rid of it?
PS. Jay Wardell's got it. Though I was not using image in the button, changing it to Custom type and rounding the corners did the trick. TY. Jay, post it as an answer I will mark it as correct one. The one that is on the left looks perfect now. Now I just have to change all my 100 or so buttons to Custom and round their corners, uhh thanks to XCode's misbehaving Round Rect Button.
It looks like you had the button's type set to UIButtonTypeRoundedRect, which would mean that the button was drawing its round rect background THEN your custom background image. Change the button's buttonType to UIButtonTypeCustom and it should work.
I am just starting out with iOS development. I'm trying to determine if this is possible in iOS and I'm new enough that I don't know what to search for, so please excuse my ignorance.
I'm going to be saving a few images in the application and the primary image will fade over another image like so:
Image A will still need to be a solid image, so my question "Is it possible to create a gradient mask that only fades for 50px from the bottom (transparent) of an image?"
Sorry if this is a basic question and since I don't know where to start I don't have any code to request help on. Any help would be appreciated! :)
Yes, it is definitely possible.
You will need to draw the images in a CGContext. Basically you would first draw image b first then draw image 'a' with an alpha mask using CGImageCreateWithMask.
It is very straight forward. See here for an example.
This question already has an answer here:
How can i apply lens effect to my UIImage?
(1 answer)
Closed 9 years ago.
I am working on an application that has an image and I want a lens (circular shape) that I can move over the image and the area comes under the circular lens will zoom.
Please provide some idea. This functionality is implemented in the app named PimpleEraser in AppStore.
This is a great tutorial on exactly what you want, a sort of magnifying glass.
This question already has answers here:
Draw part of a circle
(8 answers)
Closed 9 years ago.
I am developing an application in which I have to show a filled arc on my circle which will indicate the selected time.
I have attached an image for specifying what I exactly want to ask:-
Please help me in how to draw arc on circle.
Any suggestions will be highly appreciated.
you need something like this