开发者

keyboard movement when we click on textfield in obj c

开发者 https://www.devze.com 2023-02-27 10:06 出处:网络
hii every one, In my iphone app i need to scroll the page on click of textfield,actually it was working fine with xcode 3 ,on ios device 3.1.3,when i wa开发者_Python百科s using \"UIKeyboardBoundsUser

hii every one,

In my iphone app i need to scroll the page on click of textfield,actually it was working fine with xcode 3 ,on ios device 3.1.3,when i wa开发者_Python百科s using "UIKeyboardBoundsUserInfoKey"

but when i upgraded my xcode 3 to 4,it gave a warning saying that UIKeyboardBoundsUserInfoKey is deprecated u cant use ,so i replaced that API by UIKeyboardFrameBeginUserInfoKey now warning is gone but its not working on ios device 3.1.3,when i click on textfield it ill try to scroll the page but it ill crash,,how can i fix this,,can any one help me,...... thanx in advance


try this:

if (&UIKeyboardFrameBeginUserInfoKey!=nil) {
    // use UIKeyboardFrameBeginUserInfoKey
} else {
    // use UIKeyboardBoundsUserInfoKey         
}
0

精彩评论

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