Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以选择具体时间吗 #1

Open
liuyan3176 opened this issue Dec 17, 2015 · 15 comments
Open

可以选择具体时间吗 #1

liuyan3176 opened this issue Dec 17, 2015 · 15 comments

Comments

@liuyan3176
Copy link

在xib里把Mode改Date an Time就会报错。
具体log为:
-[UIPickerView setFrame:]: invalid height value 212.0 pinned to 180.0
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** First throw call stack:
(0x2ae1b45f 0x38cf1c8b 0x2ae1b3a5 0x2dd53a9b 0x2dd5399f 0x115d4e7 0x2dd53937 0x2e7b947b 0x2e7b94eb 0x2dd5720d 0x2dd57095 0x2dd56a71 0x2dd56875 0x2dd5074d 0x2ade1ffd 0x2addf6bb 0x2addfac3 0x2ad2d3b1 0x2ad2d1c3 0x3235a201 0x2e39743d 0xa38a5 0x3927daaf)
libc++abi.dylib: terminating with uncaught exception of type NSException

@zzBelieve
Copy link

我这边在xib修改Mode 为Date and Time 没有问题.
6ac9cd02-9646-4967-8e23-bbccacea44a1

@huzhiqin
Copy link
Owner

目前模拟器和真机都试过,没有出现任何问题哦。

@zzBelieve
Copy link

如何只精确到小时 后面不要分钟显示..model只有那几个..

@liuyan3176
Copy link
Author

在下载的demo和新建的项目里修改mode就没问题,添加到自己的项目就报错...
不加navigation也没用,使用其他的date picker也报错,都是同样的问题'CALayer position contains NaN: [nan nan]'
刚才在隔壁某第三方date demo里也发现了同样的崩溃...

@huzhiqin
Copy link
Owner

你代码有毒...
你最好打个断点。看看崩溃在哪。如果是我的控件问题,可以把问题给我。如果崩溃在自己写的代码里,你最好自己找下问题。看下frame是否有异常。

@huzhiqin
Copy link
Owner

invalid height value 212.0 pinned to 180.0
你设置height:180试试。

@liuyan3176
Copy link
Author

@huzhiqin 刚才换了下设备,相同的代码换到5S(9.1)和6+(9.2)就没问题...
但是最初的5C(8.2)就会报错

@huzhiqin
Copy link
Owner

还有此等怪事,我手机6 Plus 8.4系统也没遇到过。确定蹦在哪哦?断点多打些,一步步走。

@liuyan3176
Copy link
Author

@huzhiqin 在[self.view addSubview:_pikerView] 之后崩的...

@huzhiqin
Copy link
Owner

_pikerView.frame写的多少?

@liuyan3176
Copy link
Author

@huzhiqin _pikerView.frame = CGRectMake(0, 0, ScreenRectWidth, ScreenRectHeight + 20)
打印的是320和548
我换成 320 548+20 或者其他任意的也会崩溃

@huzhiqin
Copy link
Owner

把我的DEMO装在你说的那个问题机型上,看看会不会崩溃

@liuyan3176
Copy link
Author

@huzhiqin 不会....

@huzhiqin
Copy link
Owner

@liuyan3176 你代码有毒😂😂

@liuyan3176
Copy link
Author

@huzhiqin 但是我的代码+你的demo在5S和6+上都没问题....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants