Code Monkey home page Code Monkey logo

Comments (7)

jspahrsummers avatar jspahrsummers commented on July 17, 2024

I would be fine with changing the default, since it was implemented before we ran into some of our own troubles with Auto Layout as well.

It'd be nice to have a consistent subview layout hook on 10.7 and 10.8, though. I've done this with -resizeSubviewsWithOldSize:, but that seems unlikely to work with views that do use Auto Layout.

from rebel.

jwilling avatar jwilling commented on July 17, 2024

Lets lay out what I think is happening here:

On OS X 10.8:

  • resizeSubviewsWithOldSize: is called without auto layout
  • resizeSubviewsWithOldSize: is not called with auto layout
  • layout is called without auto layout
  • layout is called with auto layout

On OS X 10.7:

  • resizeSubviewsWithOldSize: is called without auto layout
  • resizeSubviewsWithOldSize: is not called with auto layout
  • layout is not called without auto layout
  • layout is called with auto layout

Not sure where to go from here. We could do an #ifdef and enable the resizeSubviewsWithOldSize: code if we're on anything less than 10.7. Any ideas?

from rebel.

jspahrsummers avatar jspahrsummers commented on July 17, 2024

At this point, the only thing that occurs to me is an overridable method named layoutSubviews, which is invoked from whichever layout hooks we might get (without OS conditionalizing).

That's sucky and confusing, though, and makes me think this responsibility should just lie on the user of the class.

from rebel.

jwilling avatar jwilling commented on July 17, 2024

I'm just desperately thinking of ways we could get rid of the enabling of constraints as that causes no end of problems.

from rebel.

indragiek avatar indragiek commented on July 17, 2024

Agree here, constraints cause a whole host of problems. Literally no existing code works with constraints layout enabled without some serious tweaking. I think either @jwilling's conditional or just diverting the layout responsibilities from RBLView to the subclass would be the best solutions.

from rebel.

jspahrsummers avatar jspahrsummers commented on July 17, 2024

@jwilling I wasn't disagreeing with changing the default return value of that method. I just think there's no way we can compensate for it elsewhere given the shitty layout APIs.

So, let's just remove any default layout code from RBLView.

from rebel.

jwilling avatar jwilling commented on July 17, 2024

👍

from rebel.

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.