Introduce Components and Events as first class citizens in Cocoa
| Originator: | amber | ||
| Number: | rdar://23430110 | Date Originated: | 06-Nov-2015 10:06 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7.1 (7B91b) |
| Classification: | Enhancement | Reproducible: | Always |
Summary: Today we have NS or UIControls, which are Views, and Have UIEvents. It’s hard for us to create our own custom elements that play nice with interface builders IBActions. Most controls just have a static set of events. I would like to see the next generation of cocoa introduce a notion of Components and Events as first class citizens. Component is not necessarily a UI element. A component is a type that has event properties. With this concept we can create any type of component that has events, which are observable. A UIComponent is a view that is also a Component. So a UIComponent is a nicely wrapped up piece of UI that represents an encapsulated set of behaviors. The events of a UIComponent can be wired up in interface builder like we do today with UIControls. The benefits are: - We now have observable events - We can create custom non UI components that can be used in interface builder. - We can create custom reusable pieces of UI that are not just IBInspectable, but also can play nice with the target action pattern - Sophisticated pieces of UI can be encapsulated without the ViewController bloat we see today where application logic gets all up in the view layers business.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!