开启远程推送
//NS_AVAILABLE_IOS(8_0)
[[UIApplication sharedApplication] registerForRemoteNotifications];
关闭远程推送
//NS_AVAILABLE_IOS(3_0)
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
获取tableView(collection)中某一个cell相对于屏幕的frame
获取cell相对于tableView的frame
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
获取相对于self.view的frame
CGRect rect = [tableView convertRect:rectInTableView toView:[tableView superview]];
CGRect cellInCollection = [_collection convertRect:cell.frame toView:_collection];
//获取cell在当前屏幕的位置
CGRect cellInSuperview = [_collection convertRect:cellInCollection toView:self.view];
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。