Cocos2d-iPhone version 1.0.1.
I am using CCTurnOffTiles action on a CCSprite (.png image, not animated).
Sometimes, everything goes smoothly. Other times, the sprite seems to be tinted. The tint color seems to be mostly green.
My AppDelegate has the settings I was suggested here: CCLiquid renders my screen black
This is part of my original sprite:
And this is how it looks:
This is the action code:
id myAction = [[CCTurnOffTiles actionWithSize:ccg(35, 20) duration:0.7] reverse];
I use reverse because I want my tiles to turn ON rather than OFF. But I believe that the problem persists either way.
Why might this be happening?
Related
I was following raywenderlich's Metal tutorial, but got stuck rendering a texture on a plane, it seems to be showing only one color of the image, not the entire image. I'm running on an iPad iOS 12.3.
Here's a repo for the project: https://github.com/TheJoseph-Dev/MyMetalProgram
May anyone help me?
In your Renderer implementation, set a breakpoint on the line that reads:
private lazy var device = metalView.device
And run your code.
At the point in which this line is executed, the metalView exists, but the device on that metalView is nil. Similar problems can be seen for the other lazy properties of the renderer.
You may wish to use a less complex property style as it appears the properties are not being collected when the view is in the state you expect. I suspect that the view will not create resources like its device until it is attached to a window which will happen after viewDidLoad.
Im making an app with weather icons, and i wanted to use apple's SF Symbols! At WWDC2020 they released multicolred ones.
So my question is, why are my icons appearing in black like so:
I have set the rendering mode to alwaysOriginal. And it does nothing. If i set it to template it becomes blue, like the default tint color.
currentConditionImageView.image = UIImage(systemName: "cloud.sun.fill")!.withRenderingMode(.alwaysOriginal)
But according to the SF Symbols app, the symbol should look like this:
Has anyone encountered this Problem, and how did you solve it?
Im looking forward to your answers!
The rule is:
In a template environment, such as a button, if you apply the .alwaysOriginal rendering mode to a multicolor symbol image, its inherent colors will appear.
But an image view is not a template environment. Try making this image the image (not the background image) of a UIButton.
If you put a multicolored image in a non-template environment, like an image view, you are basically misusing it if you make it .alwaysOriginal. You should just make it .alwaysTemplate and accept it as a monochrome image adopting the tint color.
If anyone could show me how to make a button similar to the one in the image below I would be really grateful!! I intend to use the button in XCode for Iphone/ IPad
I have no experience of this, but did you tried to make a e.g. 50% transparent (.GIF / .BMP) picture and set it as a background of the button?
OK so I solved this now, I set the alpha of my image to 0.7 with the following code
shootButton.alpha = 0.7;
And I also used photoshop's "Satin" effect to give it a more translucent effect.
Every time when we add UIImageView or simple UIView with some custom CALayer objects added to "layer" property to view hierarchy, there are some different scenarios:
1) all images (in uiimageviews and calayer) are drawn with random delay
2) some images are drawn, but some not, when we perform a simple touch event anywhere - they appear
3) some images are not drawn and they won't appear after simple touch events, the only way make them to appear is to minimize the app and to expand it again.
The last case appears much less than two others. That problem occurs only on iOS7, iOS 4.3-6.1 is totally OK. We have viewed a lot of possible solutions but they were pretty primitive and none of those helped.
Any help would be appreciated! Thanks in advance!
we solved the problem. For everyone, who has the same problem, - all you need is to create CALayer and UIImageView objects on main thread, while UIImage objects still could be created in background thread. All these fixes are needed only in iOS 7
I am making a jailbreak tweak that involves the multitasking switcher tray opening up a bit higher than normal... This causes there to be a black bar above the linen background image... How can I extend the linen image, or repeat it somehow so that it looks seamless?
The linen is in class SBAppSwitcherBarView
it is called SBLinenView
Thanks! :)
You'll want to create a new SBLinenView and place it where you want to extend it. You can do this by using SBLinenView's +(id)squareImageForBounds:(CGRect)bounds which returns a square UIImage of the bounds you pass it.