环境: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]];
原文地址:http://blog.csdn.net/shuang60/article/details/41750787