Post

Replies

Boosts

Views

Activity

Comment on How to save and load text & images in DocumentsDirectory
Long story short: I end up using NSTextAttachment to saveImages on the phone. To keep track the image (cursor) location in textView, I actually saved the cursor location in table as well (var imageLocation: [String] so that I can load it back to the same location in textView. Yes, I kept the image size small, but looks pretty good on the phone. It works well for me, but Not Perfect.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’22
Comment on TableView editingStyle
Q: on moveRowAt, I can move element within section: let movedTrade = sections[fromIndexPath.section].sectionTrades.remove(at: fromIndexPath.row)         sections[to.section].sectionTrades.insert(movedTrade, at: to.row) How do I move in self.trades?
Topic: Programming Languages SubTopic: Swift Tags:
May ’22
Comment on TableView editingStyle
I'm running into an interesting problem: After Add working by calling grouping.., but tableView will bring all deleted element back (as well as newly added), I can delete again, but every time I add a new item, all deleted are back, and moved items are back to original position as well. I can't figure it our....
Topic: Programming Languages SubTopic: Swift Tags:
May ’22
Comment on TableView editingStyle
One final issue: Now I have problem to insert a new row. I use AlertController to get the new trade info, it may or may not be the (section) symbol already exist. I use self.tableView.append(newTrade) it does not thing at all, but when check trades.count confirms it did added to trades. Thank you!
Topic: Programming Languages SubTopic: Swift Tags:
May ’22
Comment on MacOS 13.4 Causing project folder rename issues
Hi, I remove the Xcode and reinstalled a new copy and it is working now..
Replies
Boosts
Views
Activity
Jun ’23
Comment on How to save and load text & images in DocumentsDirectory
Long story short: I end up using NSTextAttachment to saveImages on the phone. To keep track the image (cursor) location in textView, I actually saved the cursor location in table as well (var imageLocation: [String] so that I can load it back to the same location in textView. Yes, I kept the image size small, but looks pretty good on the phone. It works well for me, but Not Perfect.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on iOS 6 Failed to prepare device for development
Can't install Xcode 14, that requires MacOS 12.5 and I have 11.7.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on cell.defaultContentConfiguration() vs cell.textLabel
Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on RATE_LIMIT_EXCEEDED: The request rate limit has been reached
Somehow it starting working again..
Replies
Boosts
Views
Activity
May ’22
Comment on alertTextFieldDidChange(_:, for: .editingChanged)
enter the default value so to save user data entry without typing. placeholder will not do it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
mistaken post, please ignore.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
Q: on moveRowAt, I can move element within section: let movedTrade = sections[fromIndexPath.section].sectionTrades.remove(at: fromIndexPath.row)         sections[to.section].sectionTrades.insert(movedTrade, at: to.row) How do I move in self.trades?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
Thank you Claude31! Highly Apprecieated. How do I close the thread?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
Thank you very much. I will spent few hours trying to understand it...
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
what is the difference between following two ones code? -sections[indexPath.section].trades.remove(at: indexPath.row) and -self.trades.removeAll(where : { $0.id == sections[indexPath.section].trades[indexPath.row] })?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
I'm running into an interesting problem: After Add working by calling grouping.., but tableView will bring all deleted element back (as well as newly added), I can delete again, but every time I add a new item, all deleted are back, and moved items are back to original position as well. I can't figure it our....
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
Got it. All working. Appreciated it!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
One final issue: Now I have problem to insert a new row. I use AlertController to get the new trade info, it may or may not be the (section) symbol already exist. I use self.tableView.append(newTrade) it does not thing at all, but when check trades.count confirms it did added to trades. Thank you!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Comment on TableView editingStyle
Thank you! All working perfect now! Appreciate it.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22