我正在尝试将 UIButton 居中到 rootView。我试过这段代码:
self.startNewCross.center = CGPointMake(self.view.center.x, self.startNewCross.frame.origin.y);
但它不起作用,然后我尝试将背景图像居中到 UIButton
self.startNewCross.imageView.contentMode = UIViewContentModeCenter;
但 uibutton 固定在左侧。如何移动uibutton?我还有其他元素,我可以毫无问题地移动它
非常感谢