Skip to content

Use custom view for TSMessage (model and view)#134

Open
XBeg9 wants to merge 5 commits into
KrauseFx:masterfrom
XBeg9:use_custom_view_for_message
Open

Use custom view for TSMessage (model and view)#134
XBeg9 wants to merge 5 commits into
KrauseFx:masterfrom
XBeg9:use_custom_view_for_message

Conversation

@XBeg9

@XBeg9 XBeg9 commented Apr 10, 2014

Copy link
Copy Markdown

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];

@KrauseFx

Copy link
Copy Markdown
Owner

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.

@dennisreimann

Copy link
Copy Markdown
Contributor

@KrauseFx please check whether or not it has any implications when we would later try to integrate this into the develop branch

@mRs-

mRs- commented Apr 16, 2014

Copy link
Copy Markdown
Collaborator

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- mRs- mentioned this pull request Apr 16, 2014
@KrauseFx

Copy link
Copy Markdown
Owner

@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?

@XBeg9

XBeg9 commented Apr 17, 2014

Copy link
Copy Markdown
Author

Added fix for height calculation.

@XBeg9

XBeg9 commented Apr 17, 2014

Copy link
Copy Markdown
Author

@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.

@mkantor

mkantor commented Jul 23, 2014

Copy link
Copy Markdown

Any chance of seeing this (or something like it) implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants