Logcat error message – Attempted to destroy barrier with non zero count

I’ve solved the problem. I was using an old version of Parse library and it was interfering with the new one. I’ve just changed the Parse.initialize() lines to: Parse.initialize(new Parse.Configuration.Builder(this) .applicationId(“MY_APP_ID”) .clientKey(“MY_CLIENT_KEY”) .server(“MY_SERVER_URL”) .build() ); and it worked!

How to compress of reduce the size of an image before uploading to Parse as PFFile? (Swift)

Yes you can use UIImageJPEGRepresentation instead of UIImagePNGRepresentation to reduce your image file size. You can just create an extension UIImage as follow: Xcode 8.2 • Swift 3.0.2 extension UIImage { enum JPEGQuality: CGFloat { case lowest = 0 case low = 0.25 case medium = 0.5 case high = 0.75 case highest = 1 … Read more

If no Table View results, display “No Results” on screen

You can easily achieve that by using backgroundView property of UITableView. Objective C: – (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { NSInteger numOfSections = 0; if (youHaveData) { yourTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; numOfSections = 1; yourTableView.backgroundView = nil; } else { UILabel *noDataLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, yourTableView.bounds.size.width, yourTableView.bounds.size.height)]; noDataLabel.text = @”No data available”; noDataLabel.textColor = [UIColor blackColor]; noDataLabel.textAlignment … Read more

How do I wait for a promise to finish before returning the variable of a function?

Instead of returning a resultsArray you return a promise for a results array and then then that on the call site – this has the added benefit of the caller knowing the function is performing asynchronous I/O. Coding concurrency in JavaScript is based on that – you might want to read this question to get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)