码迷,mamicode.com
首页 > 移动开发 > 详细

ios openflow 自动布局及大小

时间:2014-12-06 00:15:14      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:ios   openflow   布局   

环境: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 自动布局及大小

标签:ios   openflow   布局   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!