Git Product home page Git Product logo

traits's Introduction

Hi there πŸ‘‹

I am Principal engineer and creator of apps and tools that are trusted by over 80,000 teamsβ€”including industry leaders Apple, Disney, and Airbnb.

I've just released a video course that you can join if you want to save lots of time creating apps for Apple platforms.

πŸš€ I'm available for consulting and speaking engagements. Feel free to reach out to me to discuss opportunities.

In the past, I led iOS development at The New York Times, worked on apps such as Headspace, The Browser Company, and created my own indie apps like Foldify.

Community Work

You can sponsor my work and get premium content on my blog.

My Expertise

I focus on creating maintainable architecture and improving developer experience and efficiency by:

  • πŸ€” Designing flexible architecture that is easy to maintain
  • βš™οΈ Creating automation for common code tasks and workflows
  • πŸ‘₯ Establishing best practices for architecture, testing, and workflows
  • πŸ“‹ As a consultant, I usually:
    • πŸ€” Perform code reviews for entire projects and provide clients with practical recommendations to improve their team efficiency and satisfaction (through better development experience and automation)
    • πŸ‘₯ Help establish best practices and provide architecture recommendations
    • πŸ› οΈ Design and implement flexible and pragmatic solutions for hard problems
  • πŸ§™ And much more...

Talking with Me

  • 🐦 My Twitter: @merowing_
  • πŸ’¬ Pronouns: He/Him

You can learn more about me and my past experience on my blog.

traits's People

Contributors

krzysztofzablocki avatar s2ler 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

traits's Issues

Can we make it work with UIAppearance?

AFAIK, UIAppearance uses proxy objects, so we can't just set trait specs for them.

Here is what I had to do to make it work with UIAppearance.

  1. Disable restrictedTypes check (can't add private _UIAppearance type to the list)
  2. Use unsafeBitCast instead of force cast on target objects (force cast traps while trying to cast _UIAppearance to something else)
  3. Re-add root UIViews for all UIWindows after traits are reloaded (so that the changes in UIAppearance take effect).
    Maybe there is a better way to accomplish it.

The first two hacks are very dirty, but we could try to wrap them in an abstration.
We could introduce something like 'TypeCastingStrategy' and use different implementations for normal objects and UIAppearance proxies.

The hack with re-adding UIViews seems simple and working, but there could be some downsides I'm not aware of.

What do you think about this? Is support of UIAppearance worth hacking?
I could try to make a prototype :)

If i have to define a TraitIdentifierEntry for each property of each object?

Hi,

if i have to define a TraitIdentifierEntry for each property of each object, just like follow:

private var entry: TraitIdentifierEntry {
    switch self {
    case .containerView:
        return TraitIdentifierEntry("containerView", classes: [UIView.self])
    case .backgroundView:
        return TraitIdentifierEntry("backgroundView", classes: [UIView.self])
    case .titleLabel:
        return TraitIdentifierEntry("titleLabel", classes: [UILabel.self])
    case .childView:
        return TraitIdentifierEntry("childView", classes: [UIView.self])
    case .childViewWidth:
        return TraitIdentifierEntry("childView.width", classes: [NSLayoutConstraint.self])
    case .childViewHeight:
        return TraitIdentifierEntry("childView.height", classes: [NSLayoutConstraint.self])
    case .titleLabelLeading:
        return TraitIdentifierEntry("titleLabel.leading", classes: [NSLayoutConstraint.self])
    case .titleLabelTop:
        return TraitIdentifierEntry("titleLabel.top", classes: [NSLayoutConstraint.self])
    }
}

Expressing trait type restrictions via protocol?

As I understand, if I want Font trait to support UITextView I have to modify Font source code: add UITextView.self to restrictedTypes array and modify apply method.

IMO, if target type restrictions were expressed via a protocol, it would be easier to add new target classes to existing traits.

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.