GithubHelp home page GithubHelp logo

A layout control for iOS? about nimbus HOT 10 CLOSED

jverkoey avatar jverkoey commented on May 22, 2024
A layout control for iOS?

from nimbus.

Comments (10)

jverkoey avatar jverkoey commented on May 22, 2024

I have wanted something similar recently, but I think Apple is making some good headway with their new autolayout tech.

http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AutolayoutPG/AutolayoutPG.pdf

from nimbus.

jverkoey avatar jverkoey commented on May 22, 2024

Anything we build would either have to complement autolayout or be something completely different.

from nimbus.

mamcx avatar mamcx commented on May 22, 2024

Is my understanding that is only for OSX apps..

from nimbus.

jverkoey avatar jverkoey commented on May 22, 2024

I think it will be making its way to iOS soon, likely in iOS 5 or beyond.

That being said, you do raise a good point that the absence of such a framework in current distributions of iOS is really crappy. Would you be interested in tackling a feature like this?

from nimbus.

jverkoey avatar jverkoey commented on May 22, 2024

Ah, you're absolutely right that it's not even going to be in iOS 5. Ah well, that lends a pretty strong incentive to build this out for iOS then :)

If this feature is pursued, we should aim to try to provide feature parity with autolayout on iOS, under the assumption that it will likely be deprecated someday by Apple.

from nimbus.

grgcombs avatar grgcombs commented on May 22, 2024

Have either of you looked at @nextmunich's NMView and NMViewController? They've got some great stuff to deal with complex view layouts, and automatically handle rearranging upon orientation changes, etc.

from nimbus.

jverkoey avatar jverkoey commented on May 22, 2024

Sweet, our work looks done here :)

from nimbus.

jverkoey avatar jverkoey commented on May 22, 2024

Just to be fair as a follow-up here, it appears that NMView still depends on IB. Perhaps there may still be room to create a non-IB solution. Closing this issue for now until someone proves they want this bad enough and writes a design doc for the feature.

from nimbus.

grgcombs avatar grgcombs commented on May 22, 2024

Hrm... At one time I thought they had some examples that showed it with and without NIBs, but I haven't looked at it in a little while. In any event, it's neat stuff. There's always the possibility of exporting an NMView NIB to objective-c source using nib2objc, but that's probably not at all what anyone is after ;-)

from nimbus.

 avatar commented on May 22, 2024

@grgcombs, thanks for suggesting NMView ;-)

@jverkoey, we've initially created NMView as a means for building complex view components in iOS via IB that can be re-used across controllers. This was, in principle, possible by creating UIViewController subclasses but properly forwarding lifecycle events (rotation, view visibility) is a complex topic and not so easy to get right. So that's NMView's main purpose: create a re-usable view component which can be layouted using IB.

Based on this premise, we've also added the ability to define multiple different layouts of the same view for different aspect ratios (ie. for different layouts in landscape / portrait modes) via IB which are automatically appliead on frame / bounds changes. Eventually this has been refactored to work on the basis of a layout manager which is responsible for automatically layouting a UIView's subviews. As an example, the aspect-ratio code is a layout manager along with a layout manager that automatically lays out subviews in a grid.

The project contains NMView as a library and several targets showcasing NMView's features. Hope this clarification helps!

from nimbus.

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.