Git Product home page Git Product logo

xcore's People

Contributors

adeca avatar andrewmalek27 avatar clarity-fatih avatar fatihemreozkul avatar guillecom avatar hanmayz avatar kameroli avatar luismachado avatar matibzurovski avatar mstana avatar zmian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xcore's Issues

Interesting edge case with EnumIterable with @objc enums

I ran into a really interesting edge case when I was trying to iterate on an objc enum using a protocol similar to your EnumIterable that freezed the app.

Here is the stack overflow comment and my sample project:
https://stackoverflow.com/questions/24007461/how-to-enumerate-an-enum-with-string-type/28341290#comment81415358_28341290

https://github.com/n8tr/IteratingEnumTestProject

LMK if you are interested in taking a look and have any ideas why this happens, or if there is a way we could make the compiler reject objc enums conforming to the protocol.

I hope all is well zmain!
Feel free to close this out if you don't want to be bothered. :)
๐Ÿ‘

Shadowed .foregroundColor

Hi @zmian

I've noticed that foregroundColor shadows the native modifier:

func foregroundColor(_ color: UIColor) -> some View
func foregroundColor(_ color: Color?) -> some View

Now, when we have Xcore imported, the following uses the UIColor which IMHO is not desired:

Text("Text")
    .foregroundColor(.red)

Is it possible to remove the shadowing?

E.g. rename the modifier like in here:

public func foregroundUIColor(_ uiColor: UIColor) -> some View

If that's not something you'd like to change feel free to close this ๐Ÿ˜‰

Ambiguity of `scaledEffect` in SwiftUI

Hi @zmian

I've noticed an ambiguity when using SwiftUI scaledEffect with Xcore.

Because of CGSize conformance to ExpressibleByIntegerLiteral and ExpressibleByFloatLiteral as in here:

// MARK: - CGSize - ExpressibleByFloatLiteral
extension CGSize: ExpressibleByFloatLiteral {
    public init(floatLiteral value: FloatLiteralType) {
        let value = CGFloat(value)
        self = CGSize(width: value, height: value)
    }
}

// MARK: - CGSize - ExpressibleByIntegerLiteral
extension CGSize: ExpressibleByIntegerLiteral {
    public init(integerLiteral value: IntegerLiteralType) {
        let value = CGFloat(value)
        self = CGSize(width: value, height: value)
    }
}

there's an ambiguity between these SwiftUI modifiers:

@inlinable public func scaleEffect(_ s: CGFloat, anchor: UnitPoint = .center) -> some View
@inlinable public func scaleEffect(_ scale: CGSize, anchor: UnitPoint = .center) -> some View

Particularly when we try to apply scaledEffect to a SwiftUI View:

Text("Xcore")
    .scaleEffect(1.5)    // Ambiguous use of 'scaleEffect(_:anchor:)'

Do you think you can solve this issue? My current solution simply removes both conformances but I'm sure this can be solved in a better way. Please let me know what you think.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.