ios - UIAutoresizingMasks works wrong in iPad ECSlidingViewController -
i have container view ecslidingviewcontroller
. every item in container navigationviewcontroller
--> uiviewcontroller
for example in 1 child view controller have uitableview
uicollectionview
in 1 static cell.
i try implement version ipad supports changing orientation of screen, enabled authoresizing masks fill cell uicollectionview
- , had crazy issue - frame of cells - width big. example table view frame {{0, 0}, {1024, 768}}
uicollectionview
in static cell frame {{0, 0}, {1792, 1301}}
. how can solve issue?
so, i'm invalidating collectionview layout in willrotatetointerfaceorientation:duration:
sizeforitematindexpath:
called again.
- (cgsize)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout *)collectionviewlayout sizeforitematindexpath:(nsindexpath *)indexpath { return cgsizemake(self.collectionview.frame.size.width, self.collectionview..frame.size.height); } - (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { // suppress layout errors invalidating layout [self.collectionview.collectionviewlayout invalidatelayout]; }
Comments
Post a Comment