iOS UITextField added via Code has no Cursor -


i've viewcontroller , adding uitextfield subview. functioning expected, there no cursor in textfield.

i use following code create , add uitextfield:

uitextfield *funktionfield = [[uitextfield alloc] initwithframe:cgrectmake(200, 10+ line *38, myview.frame.size.width - 210, 31)]; funktionfield.backgroundcolor = [uicolor colorwithwhite:1.0 alpha:1.0]; funktionfield.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexiblerightmargin; funktionfield.tag = line; funktionfield.delegate = self; funktionfield.userinteractionenabled = yes; funktionfield.borderstyle = uitextborderstyleroundedrect; funktionfield.clearbuttonmode = uitextfieldviewmodewhileediting; [funktionfield setenabled:yes]; [myview addsubview:funktionfield]; [funktionfield becomefirstresponder]; 

as said in beginning. keyboard appears , text can edited. delgates called there no cursor.

am missing something. when add textfield via ui builder cursor there.

regards estartu

try this:

[funktionfield selectall:nil]; 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -