title: Objective-C: Drawing Random Circle Sizes
body: <p>I am working on a Game Application involving circles. How can I edit the code below to "draw" randomly sized black circles? At the moment it gets an image file set called Dot but I don't want to be limited by that + the resolution wouldn't be good on all devices.</p>
  
  <pre><code>- (UIButton *)createNewButton {
  
      UIButton * clickMe = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, 32, 32)];
      [clickMe addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
      [clickMe setBackgroundImage:[UIImage imageNamed:@"Dot"] forState:UIControlStateNormal];
      [self.view addSubview:clickMe];
  
      CGRect buttonFrame = clickMe.frame;
      int randomX = arc4random() % (int)(self.view.frame.size.width - buttonFrame.size.width);
      int randomY = arc4random() % (int)(self.view.frame.size.height - buttonFrame.size.height);
  
      buttonFrame.origin.x = randomX;
      buttonFrame.origin.y = randomY;
      clickMe.frame = buttonFrame;
      return clickMe;
  }
  </code></pre>