uiview - How to add line at the top of keyboard in ios? -
i have view in show numeric keyboard. problem keyboard missing top line. white background unpleasant effect appears:
how can add 1pt view @ top simulate top line?
quick , dirty:
- (bool)textfieldshouldbeginediting:(uitextfield *)textfield { uiview *separatorview = [[uiview alloc] initwithframe:cgrectmake(0, 0, cgrectgetwidth([uiscreen mainscreen].bounds), 1.0 / [uiscreen mainscreen].scale)]; separatorview.backgroundcolor = [uicolor lightgraycolor]; textfield.inputaccessoryview = separatorview; return yes; }
Comments
Post a Comment