I have a xib file which has a contain one uiview and 3 uibutton. flush-seamed spaced.(uiview 2px space uibuttun 2px space ...)
I apply constraints in xib files and they are automatically right place if device ipad,iphone or landscape or portrait first launching. They are getting bigger or smaller according to device. the problem start when i apply gradient to buttons.
afterthis code, when i change orientation of device bounds in xib file sizes and views are conflicting. How can i achive this problem.
İ try to these after orientation, but not work
I apply constraints in xib files and they are automatically right place if device ipad,iphone or landscape or portrait first launching. They are getting bigger or smaller according to device. the problem start when i apply gradient to buttons.
Code:
CAGradientLayer*gradientMain =[CAGradientLayer layer];
gradientMain.frame = myview.frame;//myview.bounds no matter
gradientMain.colors =[NSArray arrayWithObjects:(id)[[UIColor colorWithRed:(65/255.0) green:(64/255.0) blue:(66/255.0) alpha:1.0]CGColor],(id)[[UIColor colorWithRed:(35/255.0) green:(31/255.0) blue:(32/255.0) alpha:1.0]CGColor],nil];
[myview.layer insertSublayer:gradientMain atIndex:0];
afterthis code, when i change orientation of device bounds in xib file sizes and views are conflicting. How can i achive this problem.
İ try to these after orientation, but not work
Code:
[self.centerCollectionView reloadData];
Last edited by a moderator: