reloaddata

reloadData in MasterView from DetailView

扶醉桌前 提交于 2019-12-12 09:29:12
问题 I ran into an issue similar to this earlier on the iPhone, but the same solution doesn't seem to apply to the iPad environment. My goal is to call my method forceReload , defined in my RootViewController, that will reload the countdown_table's data in the RootView from the DetailView once a modal is dismissed. forceReload works fine when called directly from the RootViewController, but I can't seem to point to point to the RootViewController from the DetailView. I've tried using

CollectionViewController.reloadData() with data from a Parse Server

我怕爱的太早我们不能终老 提交于 2019-12-12 05:33:58
问题 I have searched the web and all the similar questions that have claimed to be solved have been either for Objective-C or they are not working right now. Does someone have a real-life example with real data, for example from a server? I am creating a Parse app and I'm stuck at self.collectionView.reloadData() . I can see my data source is being populated with data from the server. after running findObjectsInBackground(...) , I can see that the number of objects is correct in numberOfSections

UITableView reloadData within catch block

随声附和 提交于 2019-12-12 03:53:28
问题 I'm trying to add a catch block within the UITableView but it doesn't do anything. [self.dataArray addObject:@"xyz"]; @try { [self.tableView beginUpdates]; //try with nil to go to catch block [self.tableView insertRowsAtIndexPaths:nil withRowAnimation:UITableViewRowAnimationBottom]; [self.tableView endUpdates]; } @catch (NSException * e) { dispatch_async(dispatch_get_main_queue(), ^{ [self.tableView reloadData]; }); } Any advise on how to reload tableview in case there's a fail within the

reloadData() isn't work in swift

独自空忆成欢 提交于 2019-12-12 02:53:46
问题 So, I have trouble - can't reloadData of TableView, in command line I see good data - when I click button idMeet is changed, but in Simulator I don't see refresh table view after click on the button, and idMeet is changed and my query is changed too. I understand that I must use tableView.reloadData() , but don't understand where write it for correct working? var x = true; @IBOutlet weak var myButton: UIButton! @IBOutlet var tbRouteData: UITableView! @IBAction func act(sender: UIButton) { x =

Tableview not reloading after data change : IOS 5

天大地大妈咪最大 提交于 2019-12-12 02:47:00
问题 I need help in following scenario. I am building an app that displays tableview. If the user tap an entry it goes to the detailed screen. In the detail screen, I have a button to delete this entry. It deletes the entry from the data source and dismiss the modal. But after dismissing the modal, table view data is not refreshing. If I go back to parent view controller and then again come back to child screen, it refreshes the count. I read few similar posts and found the following solution.

why won't my main viewcontroller update when i segue back?

假装没事ソ 提交于 2019-12-11 20:07:18
问题 Im trying to create a very simple app. you are in feedViewController, click on bar button icon (a camera). It takes you to AddEditViewController. in AddEditView controller, you want to add a picture in an array that will be displayed in feedViewController once you click "save" but my picture is not shown until i stop the app in the simulator and run it again. import UIKit import CoreData import MobileCoreServices class FeedViewController: UIViewController, UICollectionViewDataSource,

How to insert a row in tableView without using reloadData function in Cocoa

℡╲_俬逩灬. 提交于 2019-12-11 16:25:02
问题 I been working on a self taught project in Cocoa . Trying to replicate how the media player playlist works(Play,Add and Delete and etc...). So far, I have managed to populate a tableview from the directory using NSOpenPanel . I can able to insert a new files to the tableview and play selected sound files using AVAudioPlayer . Everything works as expected. But When, I try to insert a new row to the tableView while the audioPlayer is playing . It updates the entire tableView and i am getting

UITableView reloadData() gets fired but delays

橙三吉。 提交于 2019-12-11 11:42:05
问题 I ran into this weird behavior of a UITableView . I'm fetching some records from CloudKit in my app. I have set up a dedicated subclass of NSObject to handle all this, and anytime it receives a record, it adds the record to my model array and then tells its delegate it has received something. The delegate then reloads the tableView . func cloudKitFetchedRecord(identifier: NSString) { if identifier.isEqualToString("getAllProfiles") { self.tableView.reloadData() } } This all works. Except for

Update label.text at runtime

半城伤御伤魂 提交于 2019-12-11 04:28:48
问题 I try to make a label.text value get updated in a row of a table. The update is supposed to be triggered by a user entering a number in another textfield in this row: My code looks like this: Swift 3: ViewController import UIKit class RiskPlan: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var tableView: UITableView! var probability1 = String() var impact1 = String() var riskFactor = String() var result = Int() func numberOfSections(in tableView: UITableView) -

Refreshing a UICollectionview

牧云@^-^@ 提交于 2019-12-09 14:07:32
问题 Does anyone know how to reload/refresh a UICollectionView while the collection view is being displayed? Basically I'm looking for something similar to the standard reloadData method for a UITableview. 回答1: You can just call: [self.myCollectionView reloadData]; Individual sections and items can also be reloaded: [self.myCollectionView reloadSections:indexSet]; [self.myCollectionView reloadItemsAtIndexPaths:arrayOfIndexPaths]; 回答2: [self.collectionView reloadData]; 回答3: The correct and best way