UINavigationBar - Autowidth -
having few issues auto width of custom class i'm calling. have working height, width continually truncates @ 320px wide. guess hard code each value of screen that's madness. i'm calling custom class global navigation view controller.
@implementation mycustomnav - (cgsize)sizethatfits:(cgsize)size { cgsize newsize = cgsizemake(self.frame.size.width,100); homecoming newsize; } @end i have tried;
cgsize newsize = cgsizemake(self.bounds.size.width,100); i same result uinavigatorbar truncating on each end. below screen shot.
now did read somewhere ios 8 bug. haven't confirm yet.
any ideas?
okay got working. ios8 found required little different formatting in end worked. key set bounds uiscreen mainscreen. utilize bounds seems work better.
//adjust height of navigationbar - (cgsize)sizethatfits:(cgsize)size { cgsize newsize = cgsizemake(self.frame.size.width,53); [self setframe:cgrectmake(0,0,[[uiscreen mainscreen] bounds].size.width,60)]; homecoming newsize; } hope helps someone.
uinavigationbar
No comments:
Post a Comment