小编Kar*_*Pai的帖子

xcode CollectionViewController scrollToItemAtIndexPath不工作

我创建了一个CollectionView控件并用图像填充它.现在我想在开始时滚动到特定索引处的项目.我试过scrollToItemAtIndexPath如下:

[self.myFullScreenCollectionView scrollToItemAtIndexPath:indexPath 
atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];
Run Code Online (Sandbox Code Playgroud)

但是,我得到了以下异常.任何人都可以指导我在哪里出错.

2013-02-20 02:32:45.219 ControlViewCollection1[1727:c07] *** Assertion failure in 
-[UICollectionViewData layoutAttributesForItemAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-2380.17
/UICollectionViewData.m:485 2013-02-20 02:32:45.221 ControlViewCollection1[1727:c07] must return a 
UICollectionViewLayoutAttributes instance from -layoutAttributesForItemAtIndexPath: for path 
<NSIndexPath 0x800abe0> 2 indexes [0, 4]
Run Code Online (Sandbox Code Playgroud)

xcode

30
推荐指数
6
解决办法
3万
查看次数

警告!未知的设备 API 版本

我是 Android 编程新手。我已经创建了一个应用程序,并将其部署在版本 4.0.3 的 Android 设备上。我已正确连接设备。尽管我收到此警告,但我之前已经成功部署过。我真的无法理解为什么现在没有检测到我的设备版本。

我的设备电缆松动了吗?我怎样才能解决这个问题?

android

2
推荐指数
1
解决办法
4924
查看次数

FCM 是否有一个缺点,如果设备离线,并且从 FCM 触发消息,则在设备上线时不会收到消息?

很久以前,我在我的 Android 应用程序中使用了 GCM。它有一个缺点。当一条消息从 GCM 触发到我的 Android 应用程序时,如果设备未连接到互联网,则应用程序不会收到该消息。上线后也没有收到消息FCM有同样的缺点吗?

android firebase firebase-cloud-messaging

0
推荐指数
1
解决办法
2052
查看次数