Post

Replies

Boosts

Views

Activity

Reply to Tab bar item localization
It is so easy to do it with the basic mechanisms, why do differently ? I don't see how you manage your localisation in your app. what is localise() func ? in which class do you do this ? with tabBarItem.title i'm able to localize title when it is in viewDidLoad or viewWillappear
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to Why aren't Apple employees monitoring this forum? What gives?
I do agree with you. That was my comment that it would be great to get someone with internal knowledge, provide a robust answer when other developers cannot provide it. Yes, I do experience very slow response each time I open or update a page. For several seconds (up to 5 or 6), it is waiting, progress bar stalled at 3 or 4 cm, . Unfortunately, just another illustration of the absolutely poor quality of the forum software. Hope this topic will be addressed some day in a WWDC …
May ’21
Reply to View Controller not visible in Identity Inspector
Your question is really unclear. But I guess in a moment you will provide the answer yourself… 😀 but it says no selection?  That's because you have not selected anything in the storyboard. You have to select the viewController in storyboard (click on the white bar with 3 icons at the top of the viewController in IB) and then open Identity inspector. Give it RestaurantListViewController as custom class.
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to Tab bar item localization
So you do this in the "child" VC (LevelsViewController for instance). Which is loaded only when you access to it. If you don't want to do it the simple way, you should: subclass UITabBarController: MyTabBarController create IBOutlet for the tabBar in viewDidLoad, change the titles of the tabBarItems with localiee() set the class of the TabBarController to MyTabBarController in Identity Inspector.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to Swift - How to Call and Show XIB/StoryBoard inside from XIB?
Could you explain. I am having issues with presenting the nib cell Cell is defined in a nib, PodcastViewCell, exact ? What issue exactly ? You just display the cell in the tableView. So, you should have registered the cell, in viewDidLoad (where the table view is): override func viewDidLoad() { super.viewDidLoad() let nib = UINib(nibName: "PodcastViewCell", bundle: nil)  tableView.register(nib, forCellReuseIdentifier: "PodcastViewCell") Assuming you have defined an IBOutlet (tableView) for the UITableView or that your class is a UITableViewController Does this part work OK ? If so, could you show how you call now the player ?
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to Does SKLabelNode have a method to "automatically" adjust font size?
AFAIK, you have to adjust yourself. I could not find the property 'Automatically adjust Font size' as for UILabel. See this if that may help https://stackoverflow.com/questions/32144666/resize-a-sklabelnode-font-size-to-fit and a follow up here https://stackoverflow.com/questions/41315657/adjust-text-size-to-fit-sklabelnode-with-fixed-width And this one is not precisely on your question, but you may find interesting ideas. https ://www.informit. com/articles/article.aspx?p=2234247
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to How to code a screen tap to increment/decrement a value?
Implement tapGesture on the label: one with numberOfTapsRequired set to 1 another with numberOfTapsRequired set to 2 You can add them via the storyboard by dragging tap gestures on the label. Connect each gesture to an IBAction, by control-drag from the IBAction to the corresponding gesture. @IBAction func handleLabelTap(recognizer:UITapGestureRecognizer) { print("Label Tapped") // Decrement the value value = label.text ?? 0 value += 1 label.text = String(value) var value = Int(label.text ?? "0") ?? 0 value -= 2 // Because singletap will be fired first, need to compensate for the +1 label.text = String(value) } @IBAction func handleLabelDoubleTap(recognizer:UITapGestureRecognizer) { print("Label Double Tapped") // Increment the value var value = Int(label.text ?? "0") ?? 0 value += 1 label.text = String(value) } Very important: enable user interaction for the label
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to property of UIContentConfiguration cannot be called
Looks as if content was optional ('UIContentConfiguration?'), which is surprising, but. Could you test: let registration = UICollectionView.CellRegistrationUICollectionViewListCell, Article { cell, _, item in if var content = cell.defaultContentConfiguration() { content.text = "title" cell.contentConfiguration = content } }
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to What is the "1 << 5" meaning in the EventFlags of ANCS
In following doc: https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Appendix/Appendix.html#//apple_ref/doc/uid/TP40013460-CH3-SW4 eventflag 0x20 is reserved: EventFlags Table 3-3   EventFlagsEventFlagSilent = (1 0), EventFlagImportant = (1 1), EventFlagPreExisting = (1 2), EventFlagPositiveAction = (1 3), EventFlagNegativeAction = (1 4), Reserved EventFlags = (1 5)–(1 7) But spec has not been updated in this document since 2014. So the flag may now be used. Note: found an old document (not dated, in chinese), where flags over 0x02 were reserved: https ://www.programmersought. com/article/51571699993/ https ://www.cnblogs. com/alexcai/p/4321514.html#_EventFlags which illustrates how reserved flags are progressively used.  
May ’21
Reply to SwiftUI - Show alert when go to new page
Please show more code, this is not enough.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Tab bar item localization
It is so easy to do it with the basic mechanisms, why do differently ? I don't see how you manage your localisation in your app. what is localise() func ? in which class do you do this ? with tabBarItem.title i'm able to localize title when it is in viewDidLoad or viewWillappear
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Tab bar item localization
Where do you call Localise ? Please show the complete context.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Why aren't Apple employees monitoring this forum? What gives?
I do agree with you. That was my comment that it would be great to get someone with internal knowledge, provide a robust answer when other developers cannot provide it. Yes, I do experience very slow response each time I open or update a page. For several seconds (up to 5 or 6), it is waiting, progress bar stalled at 3 or 4 cm, . Unfortunately, just another illustration of the absolutely poor quality of the forum software. Hope this topic will be addressed some day in a WWDC …
Replies
Boosts
Views
Activity
May ’21
Reply to View Controller not visible in Identity Inspector
Your question is really unclear. But I guess in a moment you will provide the answer yourself… 😀 but it says no selection?  That's because you have not selected anything in the storyboard. You have to select the viewController in storyboard (click on the white bar with 3 icons at the top of the viewController in IB) and then open Identity inspector. Give it RestaurantListViewController as custom class.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Tab bar item localization
So you do this in the "child" VC (LevelsViewController for instance). Which is loaded only when you access to it. If you don't want to do it the simple way, you should: subclass UITabBarController: MyTabBarController create IBOutlet for the tabBar in viewDidLoad, change the titles of the tabBarItems with localiee() set the class of the TabBarController to MyTabBarController in Identity Inspector.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Swift - How to Call and Show XIB/StoryBoard inside from XIB?
Could you explain. I am having issues with presenting the nib cell Cell is defined in a nib, PodcastViewCell, exact ? What issue exactly ? You just display the cell in the tableView. So, you should have registered the cell, in viewDidLoad (where the table view is): override func viewDidLoad() { super.viewDidLoad() let nib = UINib(nibName: "PodcastViewCell", bundle: nil)  tableView.register(nib, forCellReuseIdentifier: "PodcastViewCell") Assuming you have defined an IBOutlet (tableView) for the UITableView or that your class is a UITableViewController Does this part work OK ? If so, could you show how you call now the player ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to i wanna know is this is normal?
Your post is just impossible to understand. What are those example supposed to show ? What should be normal or not ? What is the code that triggers this ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Does SKLabelNode have a method to "automatically" adjust font size?
AFAIK, you have to adjust yourself. I could not find the property 'Automatically adjust Font size' as for UILabel. See this if that may help https://stackoverflow.com/questions/32144666/resize-a-sklabelnode-font-size-to-fit and a follow up here https://stackoverflow.com/questions/41315657/adjust-text-size-to-fit-sklabelnode-with-fixed-width And this one is not precisely on your question, but you may find interesting ideas. https ://www.informit. com/articles/article.aspx?p=2234247
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to How to code a screen tap to increment/decrement a value?
Implement tapGesture on the label: one with numberOfTapsRequired set to 1 another with numberOfTapsRequired set to 2 You can add them via the storyboard by dragging tap gestures on the label. Connect each gesture to an IBAction, by control-drag from the IBAction to the corresponding gesture. @IBAction func handleLabelTap(recognizer:UITapGestureRecognizer) { print("Label Tapped") // Decrement the value value = label.text ?? 0 value += 1 label.text = String(value) var value = Int(label.text ?? "0") ?? 0 value -= 2 // Because singletap will be fired first, need to compensate for the +1 label.text = String(value) } @IBAction func handleLabelDoubleTap(recognizer:UITapGestureRecognizer) { print("Label Double Tapped") // Increment the value var value = Int(label.text ?? "0") ?? 0 value += 1 label.text = String(value) } Very important: enable user interaction for the label
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Is there a method that returns how much space is being occupied by two sprites at the same time?
Do you mean the intersect of 2 sprites ? I don't think there is an existing API for that. If so, did you try to compute the intersect of the 2 nodes frames ? You can create a very simple method with this.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Swift - How to Call and Show XIB/StoryBoard inside from XIB?
Good to see you solved a first problem. Are you sure you have properly connected the podcastView to its IBOutlet ? To be sure: if not connected, connect it if connected, unconnect then reconnect and do an option clean build folder.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to property of UIContentConfiguration cannot be called
Looks as if content was optional ('UIContentConfiguration?'), which is surprising, but. Could you test: let registration = UICollectionView.CellRegistrationUICollectionViewListCell, Article { cell, _, item in if var content = cell.defaultContentConfiguration() { content.text = "title" cell.contentConfiguration = content } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to What is the "1 << 5" meaning in the EventFlags of ANCS
In following doc: https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Appendix/Appendix.html#//apple_ref/doc/uid/TP40013460-CH3-SW4 eventflag 0x20 is reserved: EventFlags Table 3-3   EventFlagsEventFlagSilent = (1 0), EventFlagImportant = (1 1), EventFlagPreExisting = (1 2), EventFlagPositiveAction = (1 3), EventFlagNegativeAction = (1 4), Reserved EventFlags = (1 5)–(1 7) But spec has not been updated in this document since 2014. So the flag may now be used. Note: found an old document (not dated, in chinese), where flags over 0x02 were reserved: https ://www.programmersought. com/article/51571699993/ https ://www.cnblogs. com/alexcai/p/4321514.html#_EventFlags which illustrates how reserved flags are progressively used.  
Replies
Boosts
Views
Activity
May ’21
Reply to Metal Sample Code in Swift?
Here, there are objC and Swift sample code https://developer.apple.com/documentation/metal/modern_rendering_with_metal But may be not what you are looking for. If you really have a problem, you should file a bug report.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21