I am trying to set a highlight position for keyboard buttons, but there are some problems with it:
- I can not set the
backgroundImage
underspaceButton Image
, so it's like the image belowshift_1
Will not overlap (button is taped). - I can not set the layer margin so that there is one place from the bottom and the second button, and at the same time that vacancy works as that button.
Below is my code:
[self.spaceButton setImage: [UIImage imageNamed: @ "shift_1"] forState: UIControlStateNormal]; [Self. Space Button setbackground display: [keyboardviewcountor imageform color: [UIColor colorWithWhite: 0.4 alpha: 0.5]] forState: UIControlStateHighlighted]; Self.spaceButton.layer.cornerRadius = 7.0; Self.spaceButton.layer.masksToBounds = Yes;
If someone can help me then I would be very grateful.
< Div class = "post-text" itemprop = "text">
You have two ways:
From the image : Just below, left Add a transparent pixel to the right image and create a new image, then set that image as a background button.
by imageEdgeInsets
: Use the set button imageEdgeInsets
and the
No comments:
Post a Comment