无法设置原点

时间:2014-07-22 04:43:49

标签: ios objective-c uibutton

我创建了一个滑块菜单,用于修改所有视图的原点。我无法强迫我UIButtons之一显示其在中心显示的动画内容。 (它想在我的滑块菜单按钮的左上角显示/锚定)有人有什么建议吗?

我觉得initWithPoint:_shareButton.center可能是关键

-(IBAction)shareTapped:(id)sender
 {
      if(shareBubbles) {
            shareBubbles = nil;
        }

      shareBubbles.center = CGPointMake(150, 150); // set center
      //center = frame.origin + bounds.size / 2
      // CGPoint shareButton = CGPointMake(78, 382);

      shareBubbles = [[AAShareBubbles alloc] initWithPoint:_shareButton.center radius:radius  inView:self.view];
      //shareBubbles.layer.anchorPoint = CGPointMake(200, -100);

      _shareButton.layer.anchorPoint = CGPointMake(100,-100);
      _shareButton.center = CGPointMake(300, -300);
      // shareBubbles.center = CGPointMake(200, -200);
      // _shareButton.origin = CGPointMake (0.0,0.0);

0 个答案:

没有答案