Post

Replies

Boosts

Views

Activity

Reply to How to read property list (binary format) if the iOS fails to load it via NSPropertyListSerialization
I tested in playground (Xcode 12.4). Works with 128. Fails with 129, with a different error message: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character b at line 1" UserInfo={NSDebugDescription=Unexpected character b at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Conversion of string failed."
Topic: App & System Services SubTopic: General Tags:
Mar ’21
Reply to UICollectionView Cell Structure Animation Affects Multiple Cells
No, that should not do this, you have a design, error somewhere. Could you show how and where you do the animation ? On which event ? Is it when you select the cell ? Here is an example (for a collectionView, but transpose directly to tableView cell: func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { selectedCollectionItem = indexPath.row let cell = collectionView.cellForItem(at: indexPath) UIView.animate(withDuration: 2.0, delay: 0.0, options: .curveEaseOut, animations: { cell?.layer.zPosition = cell!.isSelected ? 1 : -1 cell?.transform = cell!.isSelected ? CGAffineTransform(scaleX: 1.5, y: 1.5) : CGAffineTransform.identity }, completion: { (done) in cell?.transform = CGAffineTransform.identity self.performSegue(withIdentifier: "SomeSegue", sender:self) }). // I segue once animation done }
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21
Reply to Need help for lesson 14
IMHO, this is not a very good code. What is the interest to transform a Bool into String to later look for "true" or "false", instead of testing the Bool directly ? Note: when you post code, use the code formatter tool () to present it properly.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21