'punch out' effect on NSAttributedString on a UITextView - uitextview

Is it possible to add a custom attribute so that I can have a background fill around certain text ranges but with the foreground of that text being "punched out" (is this a mask) out of the background color?
If it's not possible from a custom attribute approach, is it possible in another way by overriding UITextView or something?
Thanks for any pointers!

Related

FIGMA I con set that can quickly change Color

Trying to understand how to make component sets and use variance to make designing more simplified. I have a tile that has an icon on the right that I want to be able to change both what type of icon it is as well as its colour. Is there a way to create the two-component properties using variance? Do all the icons need to be grouped by color and do I need to adjust their naming conventions (still not to sure how that works as well)h
There is a more efficient way to do this, by taking advantage of Color Styles. With this method, you only have to create your icons once, and no need for variants. Color Style swapping will handle that.
Create your icon components, but using a boring black color. Avoid creating variants of the icons, if it's only the fill color that's changing.
Instead create a standard set of Color Styles for your icons.
Your designers then, could place an instance of a black icon from your library. Then use the Selection Panel to replace the black color with one of your defined color styles.

Custom Background for list item

I have a Custom list view. This list view is basically a chat list. For each list item i want to have a particular background , as shown in the picture.
How to implement this background? Is it possible to draw this background using xml so that it adjusts to any size ?
Rectangle can be drawn using <shape> in xml file. But how to draw the whole thing? I don't mind the background color!
Kindly help!
If you want to use an image, you should use a 9-patch.
If you want a shape, just create one and use the background attribute of your main layout

xe:calendarView - How to change background color?

How to change the background color of an entry in xe:calendarView according to the type/Status of an appointment?
you should check out the following classes
.s-cv-entry-innerframe{background-color:red}
.s-cv-text{color:#FFF}
you may need to override other classes as well, look for this file
c:\Notes\framework\shared\eclipse\plugins\com.ibm.xsp.extlib.domino_8.5.3.20111208-0717.jar\resources\web\dwa\cv\themes\hannover\calendarView.css

Monotouch: BarItem badge tint color?

When I set the badge value, it's red background with white font.
Is it possible to change the background color of the badge to eg. blue?
I had to do this recently and there isn't a built-in way.
But really, it's not that hard to write your own:
Have a graphic designer make you 3 images: left side, right side, and a 1 pixel wide image you can stretch for larger numbers
Make a new control and inherit from UIView
Use a UILabel and three UIImageViews for each picture
The only slightly difficult part is going to be measuring the length of the text for centering.
Rolling your own let's you make it exactly how you need. I exposed a int? Value property that made extremely easy to use from within my apps as well as a ValueChanged event.

Round Rect Button behavior when using a flipview controller

Hia.
I am using some round rect buttons with own images for their states. Each time am displaying a different view for some stuff, the buttons become white and my images are fading in briefly later.
The problem occurs only with the UIModalTransitionStyleCrossDissolve animation.
The other 3, UIModalTransitionStyleCoverVertical, UIModalTransitionStyleFlipHorizontal and UIModalTransitionStylePartialCurl, don't show this effect.
The effect would be ok, ok if the starting color would be black. I didn't find any way to change that color in IB. Where does it come from? Any idea?
Tried to set the background over the inherited properties of UIImage, but he simply ignored it. Switching the Round rect button to a custom one solved it. Leaves the question what to do if I want a round rect. A black background image didn't help. He seems to use the background color to fade.

Resources