Environment: Xcode5.1+ios7.1+openflow+ipad
Description: In view add Openflow,xib is the other view for automatic layout, the ipad horizontal screen when the horizontal line is not full screen, modify the OpenFlow Refreshcoverflow method is as follows:
//Set the size of the OpenFlow
Afopenflowview *coverflowview = [[Afopenflowview alloc] Initwithframe:cgrectmake (0, Self.view.frame.size.width, SELF.VIEW.FRAME.SIZE.HEIGHT-100)];
Coverflowview.translatesautoresizingmaskintoconstraints = NO;//Disable automatic layout 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 automatic layout and size