We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Think about implicitly converting pointer to ids. This will make the following code easier to translate to NativeScript:
CAGradientLayer *gradient = [CAGradientLayer layer]; gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor whiteColor] CGColor], (id)[[UIColor blackColor] CGColor], nil];
Currently, this looks like this on NS:
var gradient = CAGradientLayer.layer(); var colorsArray = NSMutableArray.alloc().initWithCapacity(2); colorsArray.addObject(interop.types.id(UIColor.redColor().CGColor)); colorsArray.addObject(interop.types.id(UIColor.blueColor().CGColor)); gradient.colors = colorsArray;
If there is implicit convertion - we can get rid of the interop.types.id( ... ) calls
interop.types.id( ... )
The text was updated successfully, but these errors were encountered:
Implicitly convert Pointer to id - #30.
7c7b34e
This can now be done simply as:
var gradient = CAGradientLayer.layer(); gradient.colors = [UIColor.redColor().CGColor, UIColor.blueColor().CGColor];
Sorry, something went wrong.
96407d6
No branches or pull requests
Think about implicitly converting pointer to ids. This will make the following code easier to translate to NativeScript:
Currently, this looks like this on NS:
If there is implicit convertion - we can get rid of the
interop.types.id( ... )
callsThe text was updated successfully, but these errors were encountered: