iphone - Custom Color in UIAlertView -


hi using below code give custom color uialertview.i using s.d.k. 3.2.3 , color changing desired color.but today updated s.d.k. using 4.2.1 , run code on s.d.k. worked.but when checked again color of alertview didn't change ,but color provided image,moved backward of alertview.i don't know why happening. there wrong doesn't work ios 4.2. let me know how in ios 4.2 code working 3.2.3 sdk. code is

uialertview *forgotpassalert= [[uialertview alloc]initwithtitle:@"status" message:@"an email has sent account containing user name , password " delegate:self cancelbuttontitle:@"ok" otherbuttontitles:@"cancel",nil];          cgaffinetransform moveup = cgaffinetransformmaketranslation(0.0, -120.0);         [forgotpassalert settransform: moveup];         [forgotpassalert show];      #pragma mark (alertview custom color)                uiimage *theimage = [uiimage imagenamed:@"untitled-1.png"];             theimage = [theimage stretchableimagewithleftcapwidth:16 topcapheight:16];         cgsize thesize = [forgotpassalert frame].size;         uigraphicsbeginimagecontext(thesize);          [theimage drawinrect:cgrectmake(0, 0, thesize.width, thesize.height)];             theimage = uigraphicsgetimagefromcurrentimagecontext();          uigraphicsendimagecontext();         [[forgotpassalert layer] setcontents:(id)theimage.cgimage];          //[[passalert layer]setbackgroundcolor:[[uicolor colorwithred:179.0f/255.0f green:21.0f/255.0f blue:17.0f/255.0f alpha:1.0f]cgcolor]];         [[forgotpassalert layer]setcornerradius:7.3f];            [forgotpassalert release]; 

the possible reason behind is, apple have changed layer structure of alertview or implementation. that's why u not able see changed color.

this reason why suggested not disturb , feel of default controls (like uialertview, uiactionsheet, uipickerview) apple not provide published methods this. , whatever have done workaround broken.

you lucky enough app not crashing dont care color not showing on alert.

hope understand basic user interface guidelines.

thanks,

madhup


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -