开发者

UISearchBar problem when editing the text in searchbar

开发者 https://www.devze.com 2022-12-16 01:31 出处:网络
I have a situation here, I have a seach bar in my view. For this search bar I enter text in Hebrew (for information Hebrew is written from right to left).

I have a situation here, I have a seach bar in my view. For this search bar I enter text in Hebrew (for information Hebrew is written from right to left).

When I am writing text say "abcd" then in hebrew first 'd' appears then 'c' then 'b' and so on.

While entering text in search bar when delete is pressed first 'a' will be deleted then 'b' and so on.

but when I resign keyboard click again on 开发者_运维技巧searchbar and start editing the the cursor appears at the end(ie right ) of text and text shifts left , but actually text should stay at right and cursor should appear at left.

I have tested this on safari of iphone

change keyboard type to Hebre and try by writing text to search bar

Is there any way to resolve this


I've just tried this is a minimal app and it works as expected (not that I've any idea what the characters mean!). Writing goes from right to left and deleting goes from left to right. If I resign first responder on the search bar and then reactivate it the cursor appears in the correct position (on the left). I've tried this on the simulator and an iPhone 3G:

Simulator v3.1 (139.1)

iPhone 3G v3.1.2(7D11)

xCode 3.2.1 (snow leopard)

The search bar in Safari works correctly as well. Are you using an older OS version on the phone?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号