Post

Replies

Boosts

Views

Activity

Reply to App store release crashing
What do you mean line 40 : NEVER GETTING TO API Do you go to line 45 instead ? In that case, have you checked the value of statusCode ? If you go line 45, what is self.promptTouchOrFaceID() Are you sure it does not access UI API and thus should run in main thread ?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to choose a character
Problem is not with character but Character. You could simply use Characters for character in Characters { print("\(character.charactersName), \(character.weapon), \(character.lifePoint)") } Could you show how youn definer the Character struct ?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to initialization error when trying to segue or instantiate to vc
Before I connected the CheckoutViewController to storyboards What do you mean ? That app did "work" before you did any connection ? What did you connect ? The IBOutlets ? The IBActions ? What crash message do you get ? Please show the complete code for the ViewController, with its IBOutlet declarations and all the code. It's not very good to have super.init on line 13, in the middle. Move it at the beginnng of init()
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21
Reply to Is it possible or not to come back to the current view after the user comes to the app again?( Once the app was destroyed )
If destroyed means closed, yes: If you save the last visited view in userSettings, you can get it back when you reopen and go to this view automatically. But if destroyed means removed from the iPhone and you have to download again, no. You loose everything. Unless you save a user context on a server, but that adds useless complexity.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Can’t view Storyboard and swift code on the same screen
set the screen to show the storyboard on the left and the swift code on the right A simple way to do it: open storyboard then option-click on a swift file you want to show. it will display the file on the right. You can also click on the icon at the top right which says "add editor" and then select the file to display in.                                        _________ Note : icon looks like   |__|__+__|                                         You can also use menus to open a new panel: File New Editor or, if you want to open the new panel below, File New Editor Below For the error message, you probably have a bad connection between an object in IB and its IBOutlet. You should disconnect and reconnect.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Workflow for designing animations.
some workflow for designing elements and animation Your request is pretty vague. workflow, do you mean code logic ? what types of elements do you want to add ? For what type of animation. The logic is simple the logic for building views in Interface Builder (IB) for UIKit. Create a view insert objects inside connect objects to an IBOutlet do animation on IBOutlet in code. So please explain better what you want and the problems you have. Logic is different for SwiftUI. Look for SwiftUI tutorial on Apple's site. Or look here: https: //www.raywenderlich. com/5815412-getting-started-with-swiftui-animations or here: https ://www.hackingwithswift. com/quick-start/swiftui/how-to-create-an-explicit-animation
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to SwiftUI: Menu() doesn't work
I do see the message also, but that does not seem to cause any issue (except the extra log). It may be a debug message in Xcode that was not cleared ? Get some details here: https://stackoverflow.com/questions/64732778/creating-menu-in-swiftui-receive-output-message-of-uilog-called-uicontextm
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to App store release crashing
Could you instrument code to see what you get: let task = URLSession.shared.dataTask(with: request) { data, response, error in print("response", response, type(of: response) if let httpStatus = response as? HTTPURLResponse { print("status", httpStatus.statusCode) } if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode == 200 {
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to [UI Sketch] Tables with icons
Could you show what you have tried so far ? Is it a standard cell (Title / subtitle…) ? You can simply add this in cellForRowAt func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) - UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "CellItem", for: indexPath)         // initialise what needs to be         // either set your own image (must be the right size to fit ; of course, you should select image for each indexPath, for instance by storing image names in an array and select the right element cell.imageView?.image = UIImage(named: "Some image.png")         or use systemName image if #available(iOS 13.0, *) { cell.imageView?.image = UIImage(systemName: "sunrise") // Just an example             cell.imageView?.tintColor = .systemRed // If you want to set a specific color } else { // Fallback on earlier versions }
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21
Reply to How to get control from a combo box selection?
You can create an IBAction @IBAction func comboAction(_ sender: NSComboBox) { print("Combo selected", sender.selectedTag(), sender.selectedCell()?.title) } And connect it to the NSComboBox sentAction in IB / Connections Inspector You can also: declare that the class conforms to NSComboBoxDelegate create an IBOutlet for the comboBox (not the BoxCell) @IBOutlet weak var itemComboBox: NSComboBox!  set its delegate in viewDidLoad         itemComboBox.delegate = self Then call any of the delegate func: func comboBoxSelectionIsChanging(_ notification: Notification) { print("Selection is changing", notification) } func comboBoxSelectionDidChange(_ notification: Notification) { print("Selection has changed", notification) }
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21