小编PRA*_*EEN的帖子

通过代码强制更改/更新Firebase通知令牌或实例ID?

我应该怎么做才能在firebase中更改或请求令牌?firebase根据设备信息生成的唯一令牌.

device-instance-id ios firebase swift firebase-cloud-messaging

12
推荐指数
1
解决办法
1万
查看次数

如何以编程方式将CollectionView滚动到底部

我使用此代码滚动集合View:

let section = (self.collectionView?.numberOfSections)! - 1;
let item = (self.collectionView?.numberOfItems(inSection: section))! - 1;
let lastIndexPath = IndexPath(item: item, section: section);
self.collectionView?.scrollToItem(at: lastIndexPath, at: .bottom, animated: true);
Run Code Online (Sandbox Code Playgroud)

但我得到错误:

*由于未捕获的异常'NSRangeException'终止应用程序,原因:'* - [__ NSArrayM objectAtIndex:]:索引1超出边界[0 .. 0]'

iphone ios uicollectionview swift

5
推荐指数
3
解决办法
1万
查看次数