objective c - How to create a progress bar with two colors in iOS? -


i need create progress bar in ios first 90% in white color , rest 10% red. have checked many codes available online.

i need have simple code simple progress bar.

can guide me.

here screenshot: enter image description here

here steps yourself:

  1. create view red background. assume width 100 px.
  2. create view white background above red view.
  3. to show progress increase width of white view. 1% = 1px

if want width more 100 px progress in width ratio. example

  1. 320px width: 3.2px = 1%
  2. 1080px width: 20.16px = 2%

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -