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]];
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。