Giter Site home page Giter Site logo

Core Layout about twui HOT 7 CLOSED

avaidyam avatar avaidyam commented on August 26, 2024
Core Layout

from twui.

Comments (7)

joshaber avatar joshaber commented on August 26, 2024

I'd love it!

from twui.

avaidyam avatar avaidyam commented on August 26, 2024

In fact, I'll be slowly pushing more and more changes =____= I do believe my private TwUI fork has a lot more going for it than the public one, and it's about time I gave back xD

from twui.

avaidyam avatar avaidyam commented on August 26, 2024

HAHA, AMAZING. Core Animation rocks. CAConstraintLayoutManager does most of the work internally. Now I'll work on adding AutoLayout-like features programmatically to the TUIView. Any way to support Interface Builder with this kit? :\

EDIT: We HAVE to bake this whole framework to support all of this: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/art/lk_class_hierarchy.jpg ASAP. I see why CoreAnimation is amazing now. And why it would take a LONG time to rewrite it.

from twui.

jspahrsummers avatar jspahrsummers commented on August 26, 2024

Note that Core Animation constraints are not the same as Cocoa Auto Layout. NSLayoutConstraint is implemented with a completely different engine from CAConstraint – notably, the latter is significantly less powerful, and doesn't support ASCII format strings.

from twui.

avaidyam avatar avaidyam commented on August 26, 2024

Oh, I see, well I'll do some more research tonight and start trying to implement something to get it going.

EDIT: It does seem like a near one-to-one rewrite with newer features... Perhaps TwUI could have a TUILayoutConstraint object which wraps the CAConstraint with newer API features? I'll look into a design shortly.

from twui.

avaidyam avatar avaidyam commented on August 26, 2024

Impressive. I find this quite intriguing. I'm about 60% done with a pretty good layout engine that DOESN'T rely on Core Animation. The only thing it lacks is the ASCII format strings, priorities, and boolean relations. However, those could be easily added in with the node-based view-detached logic I've got here. Expect something tomorrow :D

P.S. I'm testing on iOS, assuming TwUI is pretty much compatible with what I'm doing, so there may be a few glitches to iron out.

from twui.

avaidyam avatar avaidyam commented on August 26, 2024

https://gist.github.com/2933609 Here's the code in the form of a TUIView category.
https://gist.github.com/2933628 is an example of its usage.
My private fork runs on manual memory management, so the gist needs to be converted to ARC.

from twui.

Related Issues (20)

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.