Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Background image ( named @"Background" ) :</p> <p><img src="https://i.stack.imgur.com/ZL0VL.png" alt="enter image description here"></p> <p>The white line ( named @"white-line" ) : </p> <p><img src="https://i.stack.imgur.com/iZ4WN.png" alt="enter image description here"></p> <p>An try this code :</p> <p>ViewController.h </p> <pre><code>#import &lt;UIKit/UIKit.h&gt; @interface ViewController : UIViewController @property (nonatomic, strong) UIImageView *whiteLine; @end </code></pre> <p>ViewController.m</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib.2 UIImageView *background = [[UIImageView alloc]initWithFrame:CGRectMake(55, 20, 209, 105)]; background.image = [UIImage imageNamed:@"Background"]; [self.view addSubview:background]; self.whiteLine = [[UIImageView alloc]initWithFrame:CGRectMake(156, 20, 7, 210)]; self.whiteLine.image = [UIImage imageNamed:@"white-line"]; [self.view addSubview:_whiteLine]; [self rotateIt1:20]; } -(void) rotateIt1:(float)angl { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:5]; self.whiteLine.transform = CGAffineTransformMakeRotation((M_PI / 180) * angl); [UIView commitAnimations]; } </code></pre> <p>It's work for me.</p> <p>Source code : <a href="http://speedy.sh/wUZQm/Speedometer.zip" rel="noreferrer">http://speedy.sh/wUZQm/Speedometer.zip</a></p> <p>Or there are a custom plugin : <a href="https://github.com/sabymike/MSSimpleGauge" rel="noreferrer">https://github.com/sabymike/MSSimpleGauge</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload