White line on the bottom on ios 7 with UITextField

后端 未结 1 776
名媛妹妹
名媛妹妹 2021-01-07 02:59

I have text field, i need to show the cursor and hide the keyboard. It looks ok in the IOS 6 and IOS 5. But in IOS 7 i can see small white line on the bottom.

My cod

相关标签:
1条回答
  • 2021-01-07 03:54

    I think this is due to the keyboard view, whose having the height as 1. So if you change the line

    UIView* dummyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)]; 
    

    to

    UIView* dummyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
    

    it will work.

    0 讨论(0)
提交回复
热议问题