TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Feb 2017 |
Maintained by Yinglun Duan.
NoChat is a lightweight chat UI framework which has no particular faces. The projects in Examples directory show you how to use this framework to implement a text game with user interface like Telegram or WeChat very easily. You can custom your own with NoChat :].
NoChat supports multiple methods for install.
Download and drop /NoChat/NoChat
folder in your project.
<NOCChatItem>
NOCChatContainerView
NOCChatInputPanel
NOCChatCollectionView
NOCChatCollectionViewLayout
NOCChatItemCell
<NOCChatItemCellLayout>
NOCChatViewController
Import the framework.
#import <NoChat/NoChat.h>
You can create a subclass of NOCChatViewController
, and provide the data.
@interface TGChatViewController : NOCChatViewController
// ...
@end
@implementation TGChatViewController
// Overrides these three methods below to provide basic classes.
+ (Class)cellLayoutClassForItemType:(NSString *)type
{
// ...
}
+ (Class)inputPanelClass
{
// ...
}
- (void)registerChatItemCells
{
// ...
}
}
Implement your business in this subclass. You may update layouts
property through
these there methods provide by super class:
insertLayouts:atIndexes:animated:
deleteLayoutsAtIndexes:animated:
updateLayoutAtIndex:toLayout:animated:
And I also suggest you custom the view controller of chat with the protocols provide by NoChat.
I mean you can write your own ChatViewController
without NOCChatViewController
.
Source code is mind, not just code, I think.
Import the framework.
import NoChat
You can create a subclass of NOCChatViewController
, and provide the data.
class TGChatViewController: NOCChatViewController {
// Overrides these three methods below to provide basic classes.
override class func cellLayoutClass(forItemType type: String) -> Swift.AnyClass? {
// ...
}
override class func inputPanelClass() -> Swift.AnyClass? {
// ...
}
override func registerChatItemCells() {
// ...
}
}
Implement your business in this subclass. The same way as description in Objective-C section above.
See the Examples projects inside.
UILabel
and HPGrowingTextView for writing text input panel. Thanks to these great contributers. And these dependencies are not essential for NoChat
framework. NoChat
is just a view layer framework which mainly provide a container just like UITableViewController
.Source code is distributed under MIT license.