ios - Change colour of border line and font color -


new xcode. have textfield has black outline on, want white. font colour needs white also. , if it's possible able center text inputted.

thanks

here code far:

self.poundstxt=[[uitextfield alloc] initwithframe:cgrectmake(17, 210, 120, 25)]; self.poundstxt.borderstyle = uitextborderstyleline; self.poundstxt.font = [uifont systemfontofsize:15]; self.poundstxt.autocorrectiontype = uitextautocorrectiontypeno; self.poundstxt.keyboardtype = uikeyboardtypenumberpad; self.poundstxt.tag=1; self.poundstxt.userinteractionenabled=yes; self.poundstxt.contentverticalalignment = uicontrolcontentverticalalignmentcenter; self.poundstxt.delegate = self; self.poundstxt.returnkeytype=uireturnkeydone; [self.view addsubview:self.poundstxt]; 

to change font color white , make text align center add this

self.poundstxt.textcolor = [uicolor whitecolor]; self.poundstxt.textalignment=uitextalignmentcenter; 

to change border color white , give width border add this

self.poundstxt.layer.bordercolor = [[uicolor whitecolor]cgcolor]; self.poundstxt.layer.borderwidth=2.0; 

import quartz core framework reference project , add

# import < quartzcore/quartzcore.h>

to viewcontroller.m work bordercolor , borderwidth.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -