iOS 6中的UIPickerView selectrow崩溃 [英] UIPickerView selectrow crash in iOS 6

查看:443
本文介绍了iOS 6中的UIPickerView selectrow崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序构建&完美地在iOS 5.x中运行,但是当我调用 selectRow:inComponent:animated: UIPickerView 的方法时崩溃iOS 6。

My application build & run in iOS 5.x perfectly, but it crashes when I call selectRow:inComponent:animated: method of UIPickerView in iOS 6.

代码:

[_pickerview selectRow:1 inComponent:0 animated:NO];

我知道这个方法在谷歌搜索时无法在iOS6中运行,但我想知道其他方法要做这个效果吗?

I know this method is not work in iOS6 when I googled it, but I want to know other method to do this effect?

推荐答案

你的崩溃日志说你使用了 -1 在代码中,应该是范围{0,1}中的数字。但是在您粘贴的代码中,您确实使用 1 。因此,您需要检查 xxx 的参数和 yyy

Your crash log says you have used a -1 in code where should be a number in range {0, 1}. But in the the code you paste you indeed use 1. So you need to check your parameter for your xxx and yyy

[_pickerview selectRow:xxx inComponent:yyy animated:NO];

这篇关于iOS 6中的UIPickerView selectrow崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆