ios 自动布局水平跟垂直居中

时间:2016-06-15 12:17:58   收藏:0   阅读:371

[view addConstraint:[NSLayoutConstraint constraintWithItem:segment attribute:NSLayoutAttributeCenterX                     relatedBy:NSLayoutRelationEqual toItem:view attribute:NSLayoutAttributeCenterX multiplier:1.0f                       constant:00.0f]];

    [view addConstraint:[NSLayoutConstraint constraintWithItem:segment attribute:NSLayoutAttributeCenterY                     relatedBy:NSLayoutRelationEqual toItem:view attribute:NSLayoutAttributeCenterY multiplier:1.0f                       constant:00.0f]];

原文:http://www.cnblogs.com/Xujg/p/5586732.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!