ios - Animate a UIImage which is drawn with a blend mode to the background -


i have several rounded rect's filled , set blend mode make blend background image doing this:

uigraphicsbeginimagecontextwithoptions(self.view.frame.size, no, 0.0); uiimage *bgimage = [uiimage imagenamed:@"uemenubackground.png"]; [bgimage drawinrect:self.view.frame];  uibezierpath *textfield1 = [uibezierpath bezierpathwithroundedrect:textfield1rect cornerradius:21]; [[uicolor colorwithred:174.0f/255.0f green:9.0/255.0f blue:34.0f/255.0f alpha:1.0] setfill]; [textfield1path fillwithblendmode:kcgblendmodeoverlay alpha:1.0f];  uibezierpath *textfield2path = [uibezierpath bezierpathwithroundedrect:textfield2rect cornerradius:21]; [[uicolor colorwithred:0 green:0 blue:0 alpha:.35] setfill]; [textfield2path fillwithblendmode:kcgblendmodenormal alpha:1.0f];  uiimage *drawnimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext();  uiimageview *finishedbgimage = [[uiimageview alloc] initwithimage:drawnimage]; [self.view addsubview:finishedbgimage]; [self.view sendsubviewtoback:finishedbgimage]; 

on top of these rounded rects have text fields user can enter text. make screen less crammed want try put text fields on scroll view background staying stationary having trouble finding way redraw rounded rects blend background scrolls. tried redrawing them each time uiscrollview:didscroll: delegate method called incredibly slow , clunky. have read looks not possible figured ask around , see if has solution. thanks!


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -