我猜我在开发者控制台中看到的这些统计数据不是实时的.有人知道他们什么时候更新它们吗?
我的统计数据很低,目前它仅显示到第12位的第11位.这是否意味着我没有在13日或14日进行任何下载或尚未更新?
在12日的所有线路站点的图表上都看不到第13和第14.这是否意味着它还没有更新?
我正在创建一个cloudkit tableview.我加载应用程序,我的tableview显示我的云套件条目.
然后我使用我的add方法insertNewObject将记录添加到云套件中,但这不会显示在我的tableview中.它只会出现在我下次运行的应用程序中.
func insertNewObject(sender: AnyObject) {
let record = CKRecord(recordType: "CloudNote")
record.setObject("New Note", forKey: "Notes")
MyClipManager.SaveMethod(Database!, myRecord:record)
dispatch_async(dispatch_get_main_queue()) {
self.tableView.reloadData()
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的添加方法.我正在调用tableview重载,你可以看到,但什么也没发生.
我的tableview创建代码:
// Tableview stuff --- Done
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
/////// Get number of rows
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return objects.count
}
//// FIll the table
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) …Run Code Online (Sandbox Code Playgroud) 目前正在开发一个快速应用程序,其中包含使用云套件填充的表格视图。
由于某种原因,当应用程序打开时,表格视图显示为空白,但是一旦触摸屏幕,我的条目列表就会突然出现。
我在下面提供了整个 Tableview 大师班,我的想法是这与功能有关viewDidLoad(),但无论我尝试什么,我似乎都无法弄清楚。
import UIKit
import CloudKit
import MobileCoreServices
class MasterViewController: UITableViewController {
//// DB setup (outside DidLoad)
let container = CKContainer.defaultContainer()
var Database: CKDatabase?
var currentRecord: CKRecord?
var detailViewController: DetailViewController? = nil
///Array to save dbrecords
var objects = [CKRecord]()
/// Initialise object of ClipManager class
let MyClipManager = ClipManager()
override func viewDidLoad() {
super.viewDidLoad()
// Database loading on runtime
Database = container.privateCloudDatabase
///Build Query
let query = CKQuery(recordType: "CloudNote", predicate: NSPredicate(format: "TRUEPREDICATE"))
///Perform query …Run Code Online (Sandbox Code Playgroud)