CRToast icon indicating copy to clipboard operation
CRToast copied to clipboard

Add option to set a custom view class.

Open mkantor opened this issue 10 years ago • 5 comments

This changeset enables the creation of custom layouts for notifications. I had to make a few things public that weren't before, namely the option defaults system and some parts of CRToastView, but hopefully the extra functionality is worth it.

mkantor avatar Jul 14 '14 19:07 mkantor

The reason that I made the CRToast options/defaults public is because some of them are pretty necessary to create a good layout (e.g. displayUnderStatusBar, text/fonts, etc).

If this is too much exposure, I could make client code keep track of this stuff itself, but the defaults would have to be duplicated since they currently aren't available from the outside.

mkantor avatar Jul 14 '14 19:07 mkantor

Hmmm, I really wanna add this feature, but I was thinking more an opt in and bring your own view kinda thing or use the built in stuff. Kinda like UITableViewCell. This would avoid exposing all these formerly private properties. This is pretty neat though and allows for the functionality of all the options to stay intact even when providing your own layout code. Gotta think on this one...

cruffenach avatar Jul 14 '14 20:07 cruffenach

Guys, when you plan to marge this useful stuff?

SPopenko avatar Aug 11 '14 12:08 SPopenko

Since @cruffenach has weighed in I don't want to jump the gun. It's up to him - once he has the time.

:+1: from me.

Ashton-W avatar Aug 11 '14 12:08 Ashton-W

Any plans to merge this CR? I need exactly this in my project and may have to fork the repo if not provided.

ghost avatar May 12 '17 09:05 ghost