title: How to make an opaque UIButton?
body: <p>I wanted to create an opaque button  with text at the right corner in the button for my application. I tried following ways to achieve the opacity but could not get the opacity. </p>
  
  <p>With below approaches I was getting white button against the background</p>
  
  <pre><code>1.      UIButton *Button = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
          Button.frame = CGRectMake(offset, height/4, buttonWidth, buttonHeight);
          [Button setTitle:ButtonLabel forState:UIControlStateNormal];
           Button.backgroundColor = [UIColor clearColor];
          [Button addTarget:self action:@selector(action:)forControlEvents:UIControlEventTouchUpInside];
          [self.view addSubview:Button];
  
  2.  CALayer *layer = Button.layer;
      layer.backgroundColor = [[UIColor clearColor] CGColor];
      layer.borderColor = [[UIColor blackColor] CGColor];
      layer.cornerRadius = 8.0f;
      layer.borderWidth = 2.0f;
  </code></pre>
  
  <p>I know this is possible duplicate, but nothing is working from the suggestions given in the links</p>
  
  <p>Also please suggest how to set title in below right corner of button.</p>