twitter-archive/twui is a Objective-C project with 2.7k stars. A UI framework for Mac based on Core Animation
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
TwUI is a hardware accelerated UI framework for Mac, inspired by UIKit. It enables:
GPU accelerated rendering backed by CoreAnimation
Simple model/view/controller development familiar to iOS developers
It differs from UIKit in a few ways:
Simplified table view cells
Block-based layout and drawRect
A consistent coordinate system (bottom left origin)
Sub-pixel text rendering
Setup
To use the current development version, include all the files in your project and import TUIKit.h. Set your target to link to the ApplicationServices and QuartzCore frameworks. Be sure to add NS_BUILD_32_LIKE_64 to your preprocessor flags.
Usage
Your TUIView-based view hierarchy is hosted inside an TUINSView, which is the bridge between AppKit and TwUI. You may set a TUINSView as the content view of your window, if you'd like to build your whole UI with TwUI. Or you may opt to have a few smaller TUINSViews, using TwUI just where it makes sense and continue to use AppKit everywhere else.
Example Project
An included example project shows off the basic construction of a pure TwUI-based app. A TUINSView is added as the content view of the window, and some TUIView-based views are hosted in that. It includes a table view, and a tab bar (which is a good example of how you might build your own custom controls).
Status
TwUI should be considered an alpha project. It is current shipping in Twitter for Mac, in use 24/7 by many, many users and has proven itself very stable. The code still has a few Twitter-for-Mac-isms that should be refactored and cleaned up.
This project follows the SemVer standard. The API may change in backwards-incompatible ways before the 1.0 release.
The goal of TwUI is to build a high-quality UI framework designed specifically for the Mac. Much inspiration comes from UIKit, but diverging to try new things (i.e. block-based layout and drawRect), and to optimize for Mac-specific interactions is encouraged.
Known limitations
There are many places where TwUI could be improved:
Accessibility. It would be great to bridge the AppKit accessibility APIs to something simpler, again, inspired by UIKit.
Text editing. TUITextEditor is a simple text editor (built on TUITextRenderer). It provides basic editing support and handles a number of standard keybindings. Fleshing this out to be indistinguishable from NSTextView (read: spellchecking, autocorrect) would be useful. If the logic around this were self-contained it would even be great as a standalone project, useful for anyone looking to build a custom text editor for the Mac.
Reverse-hosting. Right now TUIViews may be hosted inside of an existing NSView hierarchy. It would be useful if the reverse were possible, adding NSViews inside of TUIViews. Doing so in a robust way so event routing, the responder chain, and CAAnimations all just work is a challenge.
Documentation
You can generate documentation with doxygen. Install it, and then run:
cd docs
doxygen
Documentation is a work in progress, but the API will be familiar if you have used UIKit. (TODO: appledoc looks very cool, moving to that might be nice).
TwUI has a mailing list, subscribe by sending an email to [email protected].
Copyright and License
Copyright 2011 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
You may obtain a copy of the License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
How active is development on twitter-archive/twui?
The most recent commit recorded on twitter-archive/twui was 11.2 years ago, based on the GitHub push timestamp. The repository has 261 forks — one of the better signals of community interest.
How many stars does twitter-archive/twui have?
twitter-archive/twui has 2.7k GitHub stars — refresh the page for the live number, or check github.com/twitter-archive/twui. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is twitter-archive/twui open source?
TopGit's metadata for twitter-archive/twui does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is twitter-archive/twui?
twitter-archive/twui (twitter-archive/twui) is a Objective-C project on GitHub. From the project's own README: A UI framework for Mac based on Core Animation
Where do I read more about twitter-archive/twui?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/twitter-archive/twui is the definitive source.
Read full README in the tab above.
Want a second opinion on twui?
Ask an AI that can read this page — one click and you get its take on twui.