Post

Replies

Boosts

Views

Activity

Reply to How do I get the value of UITextField text instance property and update UITableView row whenever the user edits the UITextField text property?
Here's my code below. The textfield is outside of the table view. I do use reloadRows. I call it from textField(:charactersShouldChangeIn::). It reloads the row so that the table view cell in the row shows the current state of text field's text property before the text property is updated with the change the user made. self.temporaryMessageBeingEdited?.subject is type String, as you must realize. This temporaryMessageBeingEdited object is in the array the table view uses at the same chronological position as the table view row that is reloaded as must be obvious to you. Neither the textDidChange(:) nor the textWillChange(:) ever fires, though the other two callback methods of the UITextInputDelegate do fire when I test the code by typing into the text field during run time. // MARK: - UITextFieldDelegate extension MessagesViewController: UITextFieldDelegate {       func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {           print("#", #function)           guard string != "\n" else {       return false     }           self.temporaryMessageBeingEdited?.subject = self.textFieldSubject.text           if let guardedIndexPathToReload = self.indexPathOfMessageBeingEdited {       self.tableView.reloadRows(at: [guardedIndexPathToReload], with: .none)     }           return true   }     } // MARK: - UITextInputDelegate extension MessagesViewController: UITextInputDelegate {       func selectionWillChange(_ textInput: UITextInput?) {     print("#", #function)   }       func selectionDidChange(_ textInput: UITextInput?) {     print("#", #function)   }       func textWillChange(_ textInput: UITextInput?) {     print("#", #function)   }       func textDidChange(_ textInput: UITextInput?) {      print("#", #function)   }          }         }     }
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’22
Reply to How do I set UICloudSharingController.availablePermissions to not allow participants other than the owner of CKShare to copy or send a link from UICloudSharingController?
I figured out what's confusing me. With the latest iOS (16.1.2), UICloudSharingController doesn't restrict who can have access to the share when I set the availablePermissions to include .allowReadOnly and exclude .allowReadWrite. I need to post a different question to ask that.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Hit Breakpoint running Playground
Has anything changed about this? I'm actually in Playground, not Playground in Xcode, and I am able to set breakpoints in a file in the Source folder, but code execution doesn't stop at the breakpoints. I know the code runs to those points, because there are print statements that print into the debug area that are placed between those breakpoints.
Oct ’22
Reply to Does a parent record in CloudKit have to be in the same CKDatabase as a child record?
I don't think it's possible to save a record in one database and another record in a different database at the same time, so the parent record and the child record I mention in my post would have be saved in different lines of code. I think. I don't think it is possible to save two records in two different databases using CKModifyRecordsOperation. I don't know if there is a way at all.
Aug ’22
Reply to Swift file reading permission error on macOS sandbox
Does this apply to Xcode iOS projects too?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to New Forums?
Hey KMT, I haven't been able to get answers to my posts. What do I need to do about this? Daniel
Replies
Boosts
Views
Activity
Jan ’23
Reply to How do I get the value of UITextField text instance property and update UITableView row whenever the user edits the UITextField text property?
Here's my code below. The textfield is outside of the table view. I do use reloadRows. I call it from textField(:charactersShouldChangeIn::). It reloads the row so that the table view cell in the row shows the current state of text field's text property before the text property is updated with the change the user made. self.temporaryMessageBeingEdited?.subject is type String, as you must realize. This temporaryMessageBeingEdited object is in the array the table view uses at the same chronological position as the table view row that is reloaded as must be obvious to you. Neither the textDidChange(:) nor the textWillChange(:) ever fires, though the other two callback methods of the UITextInputDelegate do fire when I test the code by typing into the text field during run time. // MARK: - UITextFieldDelegate extension MessagesViewController: UITextFieldDelegate {       func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {           print("#", #function)           guard string != "\n" else {       return false     }           self.temporaryMessageBeingEdited?.subject = self.textFieldSubject.text           if let guardedIndexPathToReload = self.indexPathOfMessageBeingEdited {       self.tableView.reloadRows(at: [guardedIndexPathToReload], with: .none)     }           return true   }     } // MARK: - UITextInputDelegate extension MessagesViewController: UITextInputDelegate {       func selectionWillChange(_ textInput: UITextInput?) {     print("#", #function)   }       func selectionDidChange(_ textInput: UITextInput?) {     print("#", #function)   }       func textWillChange(_ textInput: UITextInput?) {     print("#", #function)   }       func textDidChange(_ textInput: UITextInput?) {      print("#", #function)   }          }         }     }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Is it possible to get other apps ICON?
Did you figure this out? How do you find another app's bundle in iOS?
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to What does .allowReadWrite property of UICloudSharingController allow the current user to do if his/her participant permission property is readWrite?
I figured out what's confusing me. With the latest iOS (16.1.2), UICloudSharingController doesn't restrict who can have access to the share when I set the availablePermissions to include .allowReadOnly and exclude .allowReadWrite. I need to post a different question to ask that.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to How do I set UICloudSharingController.availablePermissions to not allow participants other than the owner of CKShare to copy or send a link from UICloudSharingController?
I figured out what's confusing me. With the latest iOS (16.1.2), UICloudSharingController doesn't restrict who can have access to the share when I set the availablePermissions to include .allowReadOnly and exclude .allowReadWrite. I need to post a different question to ask that.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to BackgroundTasks Refresh debug error: No task request with identifier <decode: missing data> has been scheduled
I read somewhere on stack overflow that the queue only holds one background task at a time. Is that true? Is that only during development? What happens to the other background tasks that are submitted if the queue only holds one background task? This could be the problem.
Replies
Boosts
Views
Activity
Nov ’22
Reply to Hit Breakpoint running Playground
Has anything changed about this? I'm actually in Playground, not Playground in Xcode, and I am able to set breakpoints in a file in the Source folder, but code execution doesn't stop at the breakpoints. I know the code runs to those points, because there are print statements that print into the debug area that are placed between those breakpoints.
Replies
Boosts
Views
Activity
Oct ’22
Reply to Playground crash: AttributeGraph precondition failure: setting value during update
Does anyone have an answer to this question? Also, since the error says, 'The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.', where do I type "thread return -x"? The debug area doesn't let my type in it in Playground as it does in Xcode.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Xcode 8 error when start MyPlayground. How to fix it?
Since the error says, 'The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.', where do I type "thread return -x"? The debug area doesn't let my type in it in Playground as it does in Xcode.
Replies
Boosts
Views
Activity
Oct ’22
Reply to How do I get my iOS app to run code when something specific in a message in Messages happens?
Yeah. That works. I'm hoping to be able to call attention to the message in a more obvious way to the person receiving the message. He could put the sender in the contact and set emergency override on.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to AppIntents do not work with Shortcuts from lockscreen
Did you ever work this problem out? What's the solution?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to How to make a phone call with a button
Anyone figure out how to bypass the action sheet? Is that possible? @eskimo @ilovecats516
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to How do I avoid nested closures or clauses?
No. Do you have a source of information about that that you particularly like more than other sources?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Does a parent record in CloudKit have to be in the same CKDatabase as a child record?
I don't think it's possible to save a record in one database and another record in a different database at the same time, so the parent record and the child record I mention in my post would have be saved in different lines of code. I think. I don't think it is possible to save two records in two different databases using CKModifyRecordsOperation. I don't know if there is a way at all.
Replies
Boosts
Views
Activity
Aug ’22