swift2 - Swift iOS UI Advice -


enter image description here

i looking general advice , maybe example code of trying accomplish if knows of ios swift project. either:

a) make background, of blue view, gray , show percent of blue area.

or

b) overlay gray area on top of blue view , keep making gray area bigger.

what trying simulate battery power , show battery.

i've considered using progress bar , doing option a, blue area not solid color. image. i've tried using image progress bar, image needs keep dimensions. (ex: if progress shows 20% needs show 20% of image or "blue area", if use image progress bar shrinks image , still shows 100% of instead of 20% need show).

you can write custom self-drawing uiview behave in way describe. in other words, tell uiview percentage, , redraws blue on left , gray on right. can draw darker gray stroke outline shown in drawings. accomplished in code.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -