-1
我在一个基本的应用程序工作,出于某种原因,我不能以CGPointMake为中心视图(文本框)。我知道textBox.center = self.view.center;将中心视图,但我不知道为什么CGPointMake不工作。我正在使用Swift。CGPoint不正确定位UIView
textBox.font = UIFont.systemFontOfSize(15)
textBox.keyboardType = UIKeyboardType.Default
textBox.textAlignment = NSTextAlignment.Center
CGPointMake(187.5, 333.5)
textBox.returnKeyType = UIReturnKeyType.Done
self.view.addSubview(textBox)
'CGPointMake(187.5,333.5)'未分配给textBox的任何属性。你确定 ? –