UIButton
インスタンス化するときに a のサイズを設定して、すぐに使用できるようにするにはどうすればよいNSLayoutConstraint
ですか?
コード:
UIButtonRaisedSilver *loginButton = [UIButtonRaisedSilver buttonWithType:UIButtonTypeCustom];
[loginButton addTarget:self action:@selector(login) forControlEvents:UIControlEventTouchUpInside];
[loginButton setTitle:@"Log in" forState:UIControlStateNormal];
NSDictionary *views = @{@"tableView" : self.tableView, @"loginButton": loginButton, @"signupButton": signupButton};
[NSLayoutConstraint constraintsWithVisualFormat:@"V:[tableView]-50-[loginButton()]"
options:NSLayoutFormatAlignAllCenterX
metrics:nil
views:views];