我创建了一个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) 我是 Android 编程新手。我已经创建了一个应用程序,并将其部署在版本 4.0.3 的 Android 设备上。我已正确连接设备。尽管我收到此警告,但我之前已经成功部署过。我真的无法理解为什么现在没有检测到我的设备版本。
我的设备电缆松动了吗?我怎样才能解决这个问题?
很久以前,我在我的 Android 应用程序中使用了 GCM。它有一个缺点。当一条消息从 GCM 触发到我的 Android 应用程序时,如果设备未连接到互联网,则应用程序不会收到该消息。上线后也没有收到消息。FCM有同样的缺点吗?