twui 는 Twitter 에서 제공하는 Open Source UI Framework 입니다.
Twitter사에서 밝히고 있듯이, iOS Framework 에서 영감을 얻은 즉 iOS Component를 Mac 환경에서 사용할 수 있도록
구현해 놓은 녀석입니다.

위의 예제 이미지를 봐도 UITableView와 매우 흡사합니다. 


아직 Code를 자세히 살펴보진 않았지만,  Code 목록을 보면..
TUITableView, TUITextField 등 iOS의 UIKit에 있는 녀석들과 비슷 한녀석들이 많습니다.

TUITableViewDelegate Protocol도 UITableViewDelegate Protocol 과 매우 유사합니다.


- (void)tableView:(TUITableView *)tableView willDisplayCell:(TUITableViewCell *)cell forRowAtIndexPath:(TUIFastIndexPath *)indexPath; // called after the cell's frame has been set but before it's added as a subview

- (void)tableView:(TUITableView *)tableView didSelectRowAtIndexPath:(TUIFastIndexPath *)indexPath; // happens on left/right mouse down, key up/down

- (void)tableView:(TUITableView *)tableView didDeselectRowAtIndexPath:(TUIFastIndexPath *)indexPath;

- (void)tableView:(TUITableView *)tableView didClickRowAtIndexPath:(TUIFastIndexPath *)indexPath withEvent:(NSEvent *)event; // happens on left/right mouse up (can look at clickCount)


- (BOOL)tableView:(TUITableView*)tableView shouldSelectRowAtIndexPath:(TUIFastIndexPath*)indexPath forEvent:(NSEvent*)event; // YES, if not implemented

- (NSMenu *)tableView:(TUITableView *)tableView menuForRowAtIndexPath:(TUIFastIndexPath *)indexPath withEvent:(NSEvent *)event;



지금 진행하고 있는 Project에 한번 써볼 요량입니다. ㅎㅎ
자세한 내용은 이래저래 좀 더 만져보고 알려드리겠습니다 :)

# Project Page

https://github.com/twitter/twui

# License

Apache License 2.0 을 따릅니다.

한글 번역 자료 : http://yesarang.tistory.com/272 
 

+ Recent posts