首页 > 移动平台 > 详细

ios openflow 自动布局及大小

时间:2014-12-06 00:13:54      阅读:373      评论:0      收藏:0      [点我收藏+]

环境:xcode5.1+ios7.1+openflow+ipad

说明:在view 添加openflow,xib是其他视图为自动布局;ipad横屏时 水平线未满屏;修改openflow的refreshCoverFlow方法如下:

  //设置openflow的大小

    AFOpenFlowView *coverFlowView = [[AFOpenFlowView alloc] initWithFrame:CGRectMake(0, 50, self.view.frame.size.width, self.view.frame.size.height-100)];         

    coverFlowView.translatesAutoresizingMaskIntoConstraints = NO;  //禁用自动布局
    NSDictionary *viewsbg = NSDictionaryOfVariableBindings(self.view,coverFlowView);
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"|-0-[coverFlowView]-0-|" options:0 metrics:0 views:viewsbg]];
    //    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"|-0-[bgImage]-0-|" options:0 metrics:0 views:viewsbg]];
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-50-[coverFlowView]-50-|" options:0 metrics:0 views:viewsbg]];

  

ios openflow 自动布局及大小

原文:http://blog.csdn.net/shuang60/article/details/41750787

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!