ios - UITextView input cursor issue in iOSsimulator -
i trying create dynamic uitextviewcontroller ios application.so applicationviewcontroller trying textview.
textview coming input cursor uitextview in coming down.how blue input cursor top?
textviewcontroller.m
+(uitextfield *)prepareuitextview { uitextview *uitextview= [[uitextview alloc] initwithframe:cgrectmake( 10, 80, 300, 100)]; uitextview.layer.borderwidth = 1.0; uitextview.layer.cornerradius = 8; uitextview.font = [uifont systemfontofsize:15]; uitextview.autocorrectiontype = uitextautocorrectiontypeno; uitextview.keyboardtype = uikeyboardtypedefault; uitextview.returnkeytype = uireturnkeydone; [uitextview becomefirstresponder]; uitextview.selectedrange = nsmakerange(0, 0); return uitextview; }
applicationviewcontroller.m
[self.view addsubview:[textviewcontroller prepareuitextview]];
try code
uitextview.contentinset = uiedgeinsetsmake(-7.0,0.0,0,0.0);
adjust top value way want. solve issue.
Comments
Post a Comment