So, it sounds like a strange incident. I have a UIButton with custom background image and animation that is called randomly (this is an image of the front and back). The strange thing is that only the lower part of the button is noteable. I have another button that is set in the same way, and you can tap anywhere on the image.
The background image is just a png (its transparency) but I have other buttons that are built up until you tap in the bounding box. Any ideas?
- (zero) displaypointbutton {NSArray * pauseInfo = [self.sharedGameModel.theAssets objectForKey: @ "Boy-Annie"]; // // Maskat Button / abuttonArray has the information for a personal button in an array / / button in this sequence in this sequence is read from the // array. // 2 y position // The only image in the array is the name of the animation / so we are included in NSERRE * POS images [pauseInfo ObjectIntex: 0]; UIImage * Pauses Image = [UIImage imageNamed: [Pauses Image ObjectAddindex: 0]]; CGFloat theX = [[pauseInfo object atindex: 1] float value]; CGFloat theY = [[pauseInfo objectIntex: 2] Float value]; // Create a new destabilizing array to fill the following object / / NSMutableArray * buttonAniImages = [[NSMutableArray alloc] init] in the following loop; For (id object in paused image) {[Buttoni Images AddBect: [UIImage imageNamed: Object]]; } / / Sets a custom image for the button [self.pauseButton setImage: pauseImage forState: UIControlStateNormal]; Self.pauseButton.frame = CGRectMake (theX, theY, pauseImage.size.width, pauseImage.size.height); Self.pauseButton.imageView.animationImages = buttonAniImages; Self.pauseButton.imageView.animationDuration = 3.0; Self.pauseButton.imageView.animationRepeatCount = 1; [Self.gameScreen addSubview: self.pauseButton]; // Add action related to the button [self.pauseButton addTarget: Self-action: @Selector (no heathpausbutton :) control events: UICTrolEvent TouchUp Inside]; }
Escroft is right There was something on the top, it was never visible on top I would add my experience if someone else has to walk on the same issue.
In my game, there are several UIViews with path animation. Their initial frames were initially set to 0,0 and then the starting points of the path were randomly adjusted. But their initial frames were covering the top part of the button.
Thanks for the people who provide feedback.
No comments:
Post a Comment