Post

Replies

Boosts

Views

Activity

Reply to safe area - not understanding what I am seeing
I replicated your project: And ran it: What it shows: In storyboard, the tab bar item does appear in Navigation, but not in the views in navigation stack however, the TabBar appears there as well (in the 2 views of navigation stack) But when you run the app, the tabBarItems do appear in the view in navigation stack (the one with First In Nav label) It also appears in the next view in the navigation stack You can also see that there is a Back button in the secondView of navigation stack. Try to run your app: what do you get ? Just as you, what I do not understand is what is the gray area above the TabBar (just below label)? You probably did something wrong in your code, but just looking at your screenshots does not allow to guess what. Could you make a zip of the WHOLE project folder and attach as file ? Note: please use the right terminology: The storyboard to the lower right is to be connected to the Fermentation Calculator eventually via the navigation controller. It is not a storyboard here, it is a ViewController. Wrong terminology doesn't help understand each other.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’21
Reply to Can you change the App Icons of other apps?
Changing the app icon requires changing the plist. Not possible programmatically. However; you can get a similar result manually with shortcuts: h t t p s : / / w w w .businessinsider.fr/us/how-to-change-app-icons-on-iphone I doubt you can do the same programmatically, because that would mean an app could create havoc in a user device… Not a problem if you do it for yourself, but pretty bad for others.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Fetch Core Data Issue
Could you explain in detail what you do and get and provide enough code so that we can understand: I can save it with a button Is it ?   @IBAction func save(_ sender: UIBarButtonItem) { If so, where do you save ? Where is context defined ? but I can not seem to retrieve the objects when I restart the app. Where do you try to reload ? I get it to print over 40000 (I have no idea why) What do you mean ? and I see no favourites in my favourites section when I added them before. Where are those favourites in the code above ?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Fetch Core Data Issue
Really very hard, as each time, because you don't give a comprehensive view on your code. I get it to print over 40000 Could you explain ? Some unclear points in your code: How is CurrentPlayers defined ? Have you checked that data are effectively saved ? You should do a fetch just after save and test how many objects you get. Do you know which branch is executed in viewDidLoad ? Add some print: override func viewDidLoad() { super.viewDidLoad() if currentFav == nil { print("currentFav", currentFav) //display nil fetchSave() // <<<---- What do you get on console here ? self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none } else { print("currentFav", currentFav) NotificationCenter.default.post(name: .passFavNotification, object: self.currentFav) // <<<--- Who handles this notification ? How DispatchQueue.main.asyncAfter(deadline: .now() + 300) { self.reviewRating.requestReview(isWrittenReview: false) } } } You post a notification: please show how you handle it. Does fetch occur there ?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Swift can't find the Entity Core Data
I was wrong. As OOPer explained, If you option-click on ToDoCD, you should be sent to ToDoCD class definition. // // ToDoCD+CoreDataClass.swift // ToDoCD // // Created by Claude31 on 22/08/2021. // // This file was automatically generated and should not be edited. // import Foundation import CoreData @objc(ToDoCD) public class ToDoCD: NSManagedObject { }
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to slots to hangman game
how to generates the slots for each letter in the word What is the exact problem ? Is it to create the display or to put letters ? What you could do: create a label for each letter (you have to create as many as there are letters in word). So the best is to create an IBOutletCollection @IBOutlet var letters: [UILabel]! Because the number of letters may vary, you may choose to create the labels in code: var nbLetters : Int // You should ask player to tell how many for i in 0..<nbLetters { // create UILabels let label = UILabel(frame: CGRect(x: 20 * (i + 1), y: 50, width: 20, height: 21)) // You will set the x, y position as needed label.textAlignment = .center label.text = "_" // When there is no text letters.append(label) self.view.addSubview(label) } You could also decide in your game that words will be 10 letters max (for instance), and then create the 10 labels in storyboard, connect to the IBOutletCollection. Then when you select a word, you will hide the non needed labels. When you play, you put the letter where it fits (in the correct index of letters). For instance if T is in second (position 1 in array) letters[1].text = "T" Hope that will let you start. Start coding and come back if you have other problem. Sorry, I just notice it is SwiftUI ? What I described was for UIKit. In SwiftUI, you should create a Stack of Text for the letters.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to iOS UIAlertController Line separator missing in iPhone 12, iOS 15
I cannot replicate the problem. I tested in: Xcode 13ß5 iPhone 12 ProMax simulator with iOS 15.0 I get the line: Code (Swift) as follows: @IBAction func goToNotice(_ sender: UIButton) { let alert = UIAlertController(title: "Go to Notice 💙", message: "after alert", preferredStyle: .alert) alert.addAction(UIAlertAction( title: "OK", style: UIAlertAction.Style.default, handler: { _ in DispatchQueue.main.async { if let passDataVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "NoticeViewID") as? NoticeScrollViewController { self.present(passDataVC, animated: true, completion: nil) } } })) self.present(alert, animated: true, completion: { print("Favourite button Pressed") } ) }
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’21
Reply to Don’t show names of the calling contact
This is not an Apple contact channel. What do you expect developers here to do for you ? So, use "Contact Us" in Support section at bottom of this page. Did you try to reboot the iPhone ? Did you search on the web ? I found this: h t t p s : / / osxdaily.com/2020/02/09/contacts-showing-phone-numbers-without-names-iphone-fix/
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’21