When i try to use CosmicMind's motion animation framework, I receive an error whenever I try an example. For example, taken straight from the Sample's repo:
dateLabel.animate(.delay(1),
.duration(0.5),
.background(color: Color.cyan.base),
.completion({ [weak self] in
self?.dateLabel.animate(.delay(1),
.duration(0.5),
.background(color: Color.deepPurple.base))
}))
throws the error 'Extra argument in call'
I can't animate anything because I always receive this error. What can i do to fix it?
Thanks!
I had tested the animation with Material 2.8.1 and all worked correctly. Please make sure you are using the latest Material version. All the best!
Related
I have been playing with the SpriteView in iOS14 and its working quite well however, I noticed that some collisions that worked fine when using a UIViewcontroller would be missed using the SpriteView. So I thought to turn on showsPhysics to help with the debug. However I am stumped as to how I can do that as the skView is not available?
Can anyone help, I must be missing something.
cheers
S
So now I feel a bit dumb. The answer was to put the view.showsPhysics = true into the didMove(to view: SKView) call!
it is simple, you just need to add a new parameter wend you initialize the SpriteView:
SpriteView(scene: SKScene(), debugOptions: .showsPhysics)
I'm making a mobile game with SDL2 which will be initially developed for IOS.
I have almost finnished the game development, and now, in order to integrate it with Firebase, I need a pointer to UIViewController.
After reading countless topics, I tried this:
SDL_SysWMinfo systemWindowInfo;
SDL_VERSION (& systemWindowInfo.version);
SDL_GetWindowWMInfo (sdlWindow, & systemWindowInfo))
UIWindow * appWindow = mainWindowWMInfo.info.uikit.window;
UIViewController * rootViewController = appWindow.rootViewController;
But the line "UIViewController * rootViewController = appWindow.rootViewController;" causes this error: "Incomplete definition of type '_UIWindow'"
All topics related to this sample code are at least four years old, and I'm trying hard, but I haven't found any topics talking recently about how to get UIViewController in an SDL2 / ios project.
So, my questions are:
Is the sample code above still working in the current versions of SDL2 or has something changed in the latest version and this sample code no longer works?
If the sample code still works, what can I do wrong to cause this “Incomplete definition of type '_UIWindow'” error?
If this sample code no longer works in SDL2, how can I get a UIViewController pointer in the current version of SDL2?
Any help is welcome because I have been stuck in this problem for days. I've been working on this game for ten months and solving this problem is the last task left to complete it , so I really need to solve this issue.
I solve this problem. Everything is OK in SDL, I was using a .cpp file in this code, but I needed to use .mm file here.
So, when I switched the file name from cpp to mm, the problem has solved.
After the Swift 3 update, I'm having some trouble getting my app to compile. Most of the errors are pretty simple to fix, but I'm running into a few in particular with AWS. Is there some sort of updated AWS SDK for Swift 3? I've tried to look it up, but haven't found one. In any case, the two main errors I'm having trouble resolving are as follows:
"Type 'IdentityProviderManager' does not conform to protocol AWSIdentityProviderManager." This is for a class I created following a tutorial to set up logins through AWS Cognito. The code is:
class IdentityProviderManager: NSObject, AWSIdentityProviderManager{
var tokens : [NSString : NSString]?
init(tokens: [NSString : NSString]) {
self.tokens = tokens
}
#objc func logins() -> AWSTask<AnyObject> {
return AWSTask(result: tokens as AnyObject)
}
}
In the AWS documentation for AWSIdentityProviderManager, it says that the only required function is logins, which I have. Is there a simple way to resolve this that I'm missing?
The other error is in my LoginViewController class: "Type 'LoginViewController' does not conform to protocol 'AWSCognitoIdentityPasswordAuthentication'." Here the issue seems a bit more clear, since the documentation says that getPasswordAuthenticationDetails() is a required method and XCode seems to have changed this method to getDetails() when updating to Swift 3, unless I'm mistaken and it wasn't there to begin with or something. In any case, autocomplete doesn't give me the original method and I can't seem to make the class conform to the protocol.
Apologies if the answer is already in documentation somewhere, but as far as I can tell it seems like the AWS SDK (at least the version that I have) is somehow incompatible with Swift 3. Is there something I can do to resolve these errors?
Nevermind, it turned out XCode just wasn't showing me the option to make the changes I needed. The automatic fix implemented slightly different versions of the required functions and everything ended up working.
We have upgraded to Glass mapper latest version 4.0.9.60 from v3 and after that we started getting null reference errors with RenderImage as it returns null instead of Empty Image. We have found out that this issue was fixed with ID#177 Glass mapper version v.4.0.4.53.
We have tried installing v.4.0.4.53 and reflected the Glass.Mapper.Sc dll but we didn't find the ID#177 fixes related to adding ReturnEmtpyImage field in Config and updating GetField() method of SitecoreFieldImageMapper.cs.
Please help or advise if we are missing something here.
Please see this documentation:
http://www.glass.lu/Mapper/Sc/Documentation/EmptyImages
Looked in the CCMenu.h and it looks like it responds to the exact method Xcode (4.5.2) is saying it doesn't respond to. I've tried overriding the method and extending CCMenu, but it always throws the same message.
When I build and run my project, it seems to work fine. Should I ignore this warning and continue with my game? Another question: Is there a simple way to 'update' this code to a non-deprecated or outdated method? Here's the cocos2d-iphone-extensions version I'm using. Also, it's cocos2d 2.1.
The error is generated on line 76 of the .m file.
CCMenuAdvanced.h:
https://github.com/cocos2d/cocos2d-iphone-extensions/blob/master/Extensions/CCMenuAdvanced/CCMenuAdvanced.h
CCMenuAdvanced.m:
https://github.com/cocos2d/cocos2d-iphone-extensions/blob/master/Extensions/CCMenuAdvanced/CCMenuAdvanced.m
You are getting this warning because -(id) initWithItems: (CCMenuItem*) item vaList: (va_list) args is not present in the header file (CCMenuAdvanced.h).
You need to use + (id) menuWithItems: (CCMenuItem*) firstItem vaList: (va_list) args; from CCMenu (superclass of CCMenuAdvanced).