render - iOS: rendering a subview at the proper resolution -
i have view has few subviews. using transforms scale view 400%, works perfectly, not sure how scale "drawing" of sub-views. when render scaled view subviews come out fuzzy because drawing still @ 100%.
i have tried [view setneedsdisplay]
on view , subviews, drawing still low resolution.
any ideas on how fix render?
try:
cgfloat myscale = 4.0; [view setcontentscalefactor:myscale*[[uiscreen mainscreen] scale]]];
additionally, if embedding view within uiscrollview allow user zoom in/out put implementation in uiscrollviewdelegate:
- (void)scrollviewdidendzooming:(uiscrollview *)scrollview withview:(uiview *)view atscale:(float)scale { scale *= [[[scrollview window] screen] scale]; [view setcontentscalefactor:scale]; }
Comments
Post a Comment