Post

Replies

Boosts

Views

Activity

Reply to Update a view from a button in another view.
Contraints are not that difficult if you proceed with some method: if possible, embed items that are logically linked into a view (to avoid having a lot of objects at first level of the overall view) set the constraints of these views to the superView or the safe area inside each of these views (let's call it view A), set constraints for objects. Start from an object (O1) at the top left for instance, set its constraints relative to viewA then set constraints of other objects for which that makes sense, relative to the "anchor" object O1. if necessary repeat with an object O2, , set its constraints relative to viewA then set constraints of other objects … Good continuation.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Connecting Navigation Controller to View controller
You need to connect with a Relationship segue. Control drag from the root to the next VC and use relationship segue (root view controller) from the Navigation controller to the top VC in the navigation stack. And don't forget to do an option-clean build Folder. If that doesn't work: You said in initial post: except the Nav controller does not load the Map view when I click on the map icon, even though I have added the Map View to the View Controller. Where is this map icon ? Is it a button in a tab bar ? What is the ViewController that contains the map ? You may have to explain more precisely your set up. such as: Nav A - VC A Nav B - VC B VC B contains map button (where ? In tab bar, directly in the view ?) button segues to VC C VC C contains a mapView
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to Is there a FAQ sheet to properly ask a question and display code?
If you want to post code: if short enough, use the code formatter tool () for better presentation and line numbering. Also paste as "Paste and match Style", to avoid the editor adding a lot of empty lines. if the code is longer, use text attachment (paper clip icon on the right): click icon and paste code. like this from : Apple Inc. « The Swift Programming Language (Swift 4). » Apple Books. Code sample - https://developer.apple.com/forums/content/attachment/fc4af5e0-e860-4a57-b02f-8d081645afb8
May ’21
Reply to Swift - How to Call and Show XIB/StoryBoard inside from XIB?
I see nowhere in the code you posted, before the last message where you described the solution DetailViewController().setupPodcastPlayer(link: url) nor a call to DetailViewController() How do you want someone to guess the problem is in a code you don't show. I regret you made some of us waste their time. Hope to see you in another thread Yes, but take care next time please. Have a good day.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to XCode won't run on my MacBook
 11.3 GB is the compressed file to download. But you will need an extra 15-20 GB at least to uncompress. Plus a lot of GB to install. All in all, you should have at least 50 to 80 GB available to install new version. That's a lot effectively. You could try to download from here: https://developer.apple.com/download/more/ It requires usually a little less disk space.
May ’21
Reply to How can I access an array in one of my classes?
I cannot access the screenshot. It would be much better to show the code itself. I have a class called guessingBar guessingBar is the class of guessBar ? If so, you should name it starting with uppercase: GuessingBar guessingBar which holds 6 guessSlots So guessSlots is an Array, of what ? Or do you have 6 different guessSlots vars (guessSlots1, guessSlots2…) myGV is a structure what is the name of the struct ? Should be MyGV myGV is an instance of the struct ? Exact ? var myGV : MyGV How did you initialise it ? So, there is too much guessing here, please make it clear. I expected to be able to read the array Tell what error you get
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to What’s going on with iOS 7.5
Have you looked in the faces gallery whether you could find it back ? https://support.apple.com/en-gb/guide/watch/apdd909455f0/watchos Here is the list of available faces in WatchOS 7 https://support.apple.com/en-gb/guide/watch/apdd909455f0/watchos But they do not say if they changed something in 7.5. Is the one you speak about the Infographie (which is my favorite as well) ? If you don't find it, I suggest to file a bug report. A detail: it is WatchOS 7.5, not iOS 7.5.
Topic: App & System Services SubTopic: Core OS Tags:
May ’21
Reply to Handling Push Notifications in the app
To handle a notification, you have to: register to this notification (in general in viewDidLoad), by adding an observer NotificationCenter.default.addObserver(self, selector: #selector(someFunc), name:.kNotif, object: nil) // you need to know the name of notification The name is defined by the one who post it (here Firebase), in general as extension Notification.Name {  public static let kNotif = Notification.Name("someName") } You define the func as:     @objc func someFunc() {      // Do what you need here }
Topic: App & System Services SubTopic: Core OS Tags:
May ’21
Reply to What is the earliest method to put in and trigger a performSegue?
Could you explain the use case and the problem ? You have a VC1 displayed. From there, you will segue to another VC2 (via a button ? Automatically ?) If so, perform is called from VC1, not in viewDidLoad, nor ViewDidAppear (users need to have time to see VC1), but from the IBAction. But the vc containing this method should remain in the stack.  This depends on the type of segue. But are you sure you don't want a navigationView here ? Have a look here: https://stackoverflow.com/questions/25966215/whats-the-difference-between-all-the-selection-segues So, please explain use case.
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to How create complex ui interface in swift ?
Finally, we can have images in the forum. That's a GREAT plus. Yes, you can define different VC for each object. You can also: create the objects in IB: there are several TableViews, several Collection views Some may be a subclass of UITableView, UICollectionView, … If needed, create Views in IB, to embed some elements which are logically linked connect each object to its IBOutlet
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to How do I add a pause button in my game ?
It depends completely of what your game is, what does "run / stop" means precisely for it.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Update a view from a button in another view.
Contraints are not that difficult if you proceed with some method: if possible, embed items that are logically linked into a view (to avoid having a lot of objects at first level of the overall view) set the constraints of these views to the superView or the safe area inside each of these views (let's call it view A), set constraints for objects. Start from an object (O1) at the top left for instance, set its constraints relative to viewA then set constraints of other objects for which that makes sense, relative to the "anchor" object O1. if necessary repeat with an object O2, , set its constraints relative to viewA then set constraints of other objects … Good continuation.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Connecting Navigation Controller to View controller
You need to connect with a Relationship segue. Control drag from the root to the next VC and use relationship segue (root view controller) from the Navigation controller to the top VC in the navigation stack. And don't forget to do an option-clean build Folder. If that doesn't work: You said in initial post: except the Nav controller does not load the Map view when I click on the map icon, even though I have added the Map View to the View Controller. Where is this map icon ? Is it a button in a tab bar ? What is the ViewController that contains the map ? You may have to explain more precisely your set up. such as: Nav A - VC A Nav B - VC B VC B contains map button (where ? In tab bar, directly in the view ?) button segues to VC C VC C contains a mapView
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Is there a FAQ sheet to properly ask a question and display code?
If you want to post code: if short enough, use the code formatter tool () for better presentation and line numbering. Also paste as "Paste and match Style", to avoid the editor adding a lot of empty lines. if the code is longer, use text attachment (paper clip icon on the right): click icon and paste code. like this from : Apple Inc. « The Swift Programming Language (Swift 4). » Apple Books. Code sample - https://developer.apple.com/forums/content/attachment/fc4af5e0-e860-4a57-b02f-8d081645afb8
Replies
Boosts
Views
Activity
May ’21
Reply to Swift - How to Call and Show XIB/StoryBoard inside from XIB?
I see nowhere in the code you posted, before the last message where you described the solution DetailViewController().setupPodcastPlayer(link: url) nor a call to DetailViewController() How do you want someone to guess the problem is in a code you don't show. I regret you made some of us waste their time. Hope to see you in another thread Yes, but take care next time please. Have a good day.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to XCode won't run on my MacBook
 11.3 GB is the compressed file to download. But you will need an extra 15-20 GB at least to uncompress. Plus a lot of GB to install. All in all, you should have at least 50 to 80 GB available to install new version. That's a lot effectively. You could try to download from here: https://developer.apple.com/download/more/ It requires usually a little less disk space.
Replies
Boosts
Views
Activity
May ’21
Reply to How can I access an array in one of my classes?
I cannot access the screenshot. It would be much better to show the code itself. I have a class called guessingBar guessingBar is the class of guessBar ? If so, you should name it starting with uppercase: GuessingBar guessingBar which holds 6 guessSlots So guessSlots is an Array, of what ? Or do you have 6 different guessSlots vars (guessSlots1, guessSlots2…) myGV is a structure what is the name of the struct ? Should be MyGV myGV is an instance of the struct ? Exact ? var myGV : MyGV How did you initialise it ? So, there is too much guessing here, please make it clear. I expected to be able to read the array Tell what error you get
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Can not update to OS Big Sur 11.4 11.4
You can check status : https://www.apple.com/support/systemstatus/ and here https://developer.apple.com/system-status/ At this time, everything seems OK. Are you going through a firewall ? Ofr with a slow connection ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to NSTableView height
That's logical. As you had defined some constraints (top and bottom, may be leading as well ?), you need to define constraints for all directions, as I told in previous post.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to What’s going on with iOS 7.5
Have you looked in the faces gallery whether you could find it back ? https://support.apple.com/en-gb/guide/watch/apdd909455f0/watchos Here is the list of available faces in WatchOS 7 https://support.apple.com/en-gb/guide/watch/apdd909455f0/watchos But they do not say if they changed something in 7.5. Is the one you speak about the Infographie (which is my favorite as well) ? If you don't find it, I suggest to file a bug report. A detail: it is WatchOS 7.5, not iOS 7.5.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to why HStack items not alignnment in SwiftUI?
We miss elements to test: What is DrawShape ? what are data ? Could you tell very precisely what is not aligned ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Handling Push Notifications in the app
To handle a notification, you have to: register to this notification (in general in viewDidLoad), by adding an observer NotificationCenter.default.addObserver(self, selector: #selector(someFunc), name:.kNotif, object: nil) // you need to know the name of notification The name is defined by the one who post it (here Firebase), in general as extension Notification.Name {  public static let kNotif = Notification.Name("someName") } You define the func as:     @objc func someFunc() {      // Do what you need here }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to What is the earliest method to put in and trigger a performSegue?
Could you explain the use case and the problem ? You have a VC1 displayed. From there, you will segue to another VC2 (via a button ? Automatically ?) If so, perform is called from VC1, not in viewDidLoad, nor ViewDidAppear (users need to have time to see VC1), but from the IBAction. But the vc containing this method should remain in the stack.  This depends on the type of segue. But are you sure you don't want a navigationView here ? Have a look here: https://stackoverflow.com/questions/25966215/whats-the-difference-between-all-the-selection-segues So, please explain use case.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Collaboration
_how the collaboration works _ Could you explain your question ? Which collaboration ?
Replies
Boosts
Views
Activity
May ’21
Reply to How create complex ui interface in swift ?
Finally, we can have images in the forum. That's a GREAT plus. Yes, you can define different VC for each object. You can also: create the objects in IB: there are several TableViews, several Collection views Some may be a subclass of UITableView, UICollectionView, … If needed, create Views in IB, to embed some elements which are logically linked connect each object to its IBOutlet
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21