Post

Replies

Boosts

Views

Activity

Reply to Need Help Transfer Data From Button
To be sure to understand where you stand now, could you repost the most recent code: IBAction prepare for segue Another option is to get the name directly in the IBAction: @IBAction func CamButtonA(_ sender: UIButton) { // Find the cell which contains this button var superview = sender.superview while let view = superview, !(view is UITableViewCell) { superview = view.superview } guard let cell = superview as? FavCell else { return } selectedNameInCell = cell.name.text performSegue(withIdentifier: "hs", sender: nil) }
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’21
Reply to Incorrect height of iPad floating keyboard
That seems to be an old issue with keyboard size. I filed a bug, in 2018 (radar ID 38117524 - FB5721145) for keyboard size issues. Here's an abstract: Value for keyboard height returned by note.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue is erroneous after turning iPad from Portrait to Landscape This is for a numeric keypad on iPad (numbers at top, special characters below, help line at the top). This occurs both on device and in Xcode simulator Steps to Reproduce: On iPad, select numeric keypad (numbers at top, special characters below, help line at the top), for a textField In keyboardWillShow, get the keyboard size, and ask for printing it : @objc func keyboardWillShow(_ note : Notification) -> Void { if let keyboardSize = (note.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue { print("keyboardSize", keyboardSize) Start in landscape, click on field to show keyboard, then turn portrait then return landscape, the keyboard staying displayed on screen. Expected Results: Height should be 398 when returning to landscape Actual Results: Height is 142 after returning to landscape. keyboardSize (0.0, 768.0, 1024.0, 398.0) // Landscape, seems correct keyboardSize (0.0, 1024.0, 768.0, 313.0) // Portrait, effectively smaller in height keyboardSize (0.0, 768.0, 1024.0, 142.0) // Return to landscape: height is now clearly wrong keyboardSize (0.0, 626.0, 1024.0, 142.0) // Note: keyboardWillShow is called a second time and removes 142.0 from origin.y. Version/Build: IOS 11.2.5 (15D100) Xcode Version 9.2 beta (9C34b) OSX Version 10.13.3 (17D102)
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’21
Reply to How to compare dates from two view controllers (Core Data and Swift)?
it doesn't work That tells nothing, please explain what you get (or don't get) and what you expected. Are model.dateSaved and dateFromFirstViewboth Date ? If so, are the dates exactly the same ? You should add some print to log: if model.dateSaved == dateFromFirstView { print("Dates are the same") cell.textLabel!.text = model.event } else { print(model.dateSaved, "is not the same as", dateFromFirstView) } And tell what you get.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’21
Reply to Cannot use instance member 'retreiveFromArrayOfMeme' within property initializer
Write an init() where you will set the value. Get more details in this other thread: https://developer.apple.com/forums/thread/685605
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Is the app build number still customizable?
TF ???
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
Just a typo, working in forum editor and not XCode: it is indexPath and not IndexPath     if let cell = tableView.cellForRow(at: indexPath) {
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
I don't know enough about cell. Is it a custom class ? Or is yahooName the title of the standard cell ? In such a case, just call: selectedNameInCell = cell.textLabel!.text!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
So you should:     if let cell = tableView.cellForRow(at: IndexPath) as? FavCell {       selectedNameInCell = cell.name.text     }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
To be sure to understand where you stand now, could you repost the most recent code: IBAction prepare for segue Another option is to get the name directly in the IBAction: @IBAction func CamButtonA(_ sender: UIButton) { // Find the cell which contains this button var superview = sender.superview while let view = superview, !(view is UITableViewCell) { superview = view.superview } guard let cell = superview as? FavCell else { return } selectedNameInCell = cell.name.text performSegue(withIdentifier: "hs", sender: nil) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to How do I use sockets in Swift?
Did you search for "Swift sockets" ? There are a lot of references and tutorials: https://stackoverflow.com/questions/28466665/sockets-with-swift and notably this one: h t t p s : / /stackoverflow.com/questions/28466665/sockets-with-swift
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to orderedIndex property of NSWindow broken
Which version of Xcode / MacOS ? I tested with Xcode 13ß4 and MacOS 11.5. I get 1 as a result (called from viewWillAppear). Could you post the code so that we can try to replicate ?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to How to hide a button in NSTouchBar if NSAlert presented?
hide all buttons in NSAlert Which buttons ? There are only the buttons you define yourself, so why do you add if you want to hide? But how do you expect user to close the alert ?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Incorrect height of iPad floating keyboard
That seems to be an old issue with keyboard size. I filed a bug, in 2018 (radar ID 38117524 - FB5721145) for keyboard size issues. Here's an abstract: Value for keyboard height returned by note.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue is erroneous after turning iPad from Portrait to Landscape This is for a numeric keypad on iPad (numbers at top, special characters below, help line at the top). This occurs both on device and in Xcode simulator Steps to Reproduce: On iPad, select numeric keypad (numbers at top, special characters below, help line at the top), for a textField In keyboardWillShow, get the keyboard size, and ask for printing it : @objc func keyboardWillShow(_ note : Notification) -> Void { if let keyboardSize = (note.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue { print("keyboardSize", keyboardSize) Start in landscape, click on field to show keyboard, then turn portrait then return landscape, the keyboard staying displayed on screen. Expected Results: Height should be 398 when returning to landscape Actual Results: Height is 142 after returning to landscape. keyboardSize (0.0, 768.0, 1024.0, 398.0) // Landscape, seems correct keyboardSize (0.0, 1024.0, 768.0, 313.0) // Portrait, effectively smaller in height keyboardSize (0.0, 768.0, 1024.0, 142.0) // Return to landscape: height is now clearly wrong keyboardSize (0.0, 626.0, 1024.0, 142.0) // Note: keyboardWillShow is called a second time and removes 142.0 from origin.y. Version/Build: IOS 11.2.5 (15D100) Xcode Version 9.2 beta (9C34b) OSX Version 10.13.3 (17D102)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to JavaScript: Read big files in chunks - WebkitBlobResource error 1 on iOS Safari
If that occurs always at 60 seconds, not at the same file position (if you can check), that looks more like a time out. Did you try with a smaller file that would need just less than 60 s ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Failed to update Mac Os Big Sur 11.5.1
Have you checked you have enough disk space ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to How to compare dates from two view controllers (Core Data and Swift)?
it doesn't work That tells nothing, please explain what you get (or don't get) and what you expected. Are model.dateSaved and dateFromFirstViewboth Date ? If so, are the dates exactly the same ? You should add some print to log: if model.dateSaved == dateFromFirstView { print("Dates are the same") cell.textLabel!.text = model.event } else { print(model.dateSaved, "is not the same as", dateFromFirstView) } And tell what you get.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to JavaScript: Read big files in chunks - WebkitBlobResource error 1 on iOS Safari
So that looks like a timeout issue. Don't know if you can set the timeout value. Maybe this will provide some hint ? https://stackoverflow.com/questions/31140212/failed-to-load-resource-request-timed-out-on-safari
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to How to declare a TableColumn with nullable field?
Did you just try to initialise it ? let productURL: String? = nil Note that I didn't test.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21