Back to Apping, Part III


Now, where was I? Ah, yes: the software library. What’s wrong with the tools we’re given? Well, nothing, really… Well, actually…

I love Apple’s controls. In no time you can cobble something together that looks pretty cool… but, then, so can the next programmer. Worse, the next programmer probably has much more money and resources than you do. And even if they don’t, then there are a thousand more that do.

I need my work to stand out.

If I can create something cooler than the norm, then great. For instance, here’s an Apple slider.

Simple, elegant, does what it says on the tin. But here are my problems with it:

  1. My app might require sub-ticks as well as ticks;
  2. I cannot control a range of values; I’d need multiple sliders… = more scrolling;
  3. The blue is a system-set colour – and would probably look better as a horizontal gradient;
  4. If I have multiple sliders, and one is more important than the others, how can I make it stand out?

In summary, the standard control is too simple, and does not give me enough fine control. Which is absolutely fine for 95% of uses.

Now, here’s my control, in a basic configuration:

Apple’s bar has a subtle 3D-gradient fill; mine has a less subtle horizontal gradient. My drop shadow is also a little different.

Here’s my control again, with some more options added:

Sliders can also be vertical; I’m too lazy to screenshot that but tilt your head to one side and you’ll get the idea!

The coding of such a control (I imaginatively call it a PBGUI_Super_Slider!) does not take long. Maybe a week or two with my time limitations. But I felt I needed to do it to minimize scrolling (did I mention I hate scrolling?) while hopefully not making everything look too cluttered.

One thing that annoys me about Slider controls in general (I don’t think it’s just Apple who are guilty of doing this) is the property numberOfTickMarks. For a scale of 0 to 10 I have to think a beat about whether this should be set to 10 or 11. If I then change the min/max value I also have to change the number of tick marks again. I appreciate that this might seem like a trivial issue but when my tiny brain’s capacity is full, trivial problems lead to easy errors. So my “Super” Slider has an alternative property for setting the value interval. In the above example, I can simply set it to 1 and forget about it.

My Super Slider is not perfect. If I had more time I’d add an extra 3D gradient and some animation. If I had coded it this year not last I’d be using Metal for that little extra sparkle. But, for now, it’ll do for my purposes.

Anyway, that’s one control out of many. I might talk about some of the others next…

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s