TSMessages
TSMessages copied to clipboard
Use custom view for TSMessage (model and view)
Now we can subclass and create own controls under TSMessageView. I have also separate view and model (item). Please check example TSMessageCustomItem and TSMessageCustomView.
TSMessageCustomItem *item = [TSMessageCustomItem itemWithTitle:@"Test" subtitle:@"description" type:TSMessageNotificationTypeSuccess inViewController:self tapHandler:^(TSMessageCustomItem *item) {
NSLog(@"Message did pressed");
} iconHandler:^(TSMessageCustomItem *item) {
NSLog(@"Icon did pressed");
} disclosureView:nil disclosureHandler:^(TSMessageCustomItem *item) {
NSLog(@"Disclosure view did pressed");
}];
[TSMessage showNotificationMessageWithItem:item];
Wow, this Pull Request is huge! Thanks a lot for your contribution. I hope I'll get to take a look at it in the next days.
@KrauseFx please check whether or not it has any implications when we would later try to integrate this into the develop branch
So what's the real deal here? Are we going to implement this in the 0.X Versions and rebuild this from the scratch in the 1.X develop branch?
@mRs- I think this should be in the 1.0 release. On the first glance, this PR looks really great and offers a nice way for developers to extend the functionality of TSMessages without touching the core. I still want to take a look at all changes in detail.
How about merging this PR into the develop branch and experiment with it a little?
Added fix for height calculation.
@KrauseFx I am apologize in advance if something is not developed carefully, it took me only 1 night for very urgent project. I haven't enough time now to clean everything, but if you want me to help in something don't hesitate.
Any chance of seeing this (or something like it) implemented?