Post

Replies

Boosts

Views

Activity

Sorting source code files in Xcode's navigator
Since Xcode 16 sorting source code files in the navigator with ascending order by name results in: A.hpp A.cpp B.hpp B.cpp ... Previous versions of Xcode sorted the files correctly (with respect to ascending order): A.cpp A.hpp B.cpp B.hpp Is this a bug or is there any parameter I have to set to get the old ordering back?
0
1
406
Oct ’24
LearnMetalCpp examples: why not crashing because of used semaphore?
The examples in LearnMetalCpp do in the renderer's draw method something like this: select a frame for the instance buffer create a new command buffer call dispatch_semaphore_wait to make sure that the selected instance buffer is not used by Metal put dispatch_semaphore_signal into the command buffer's completed handler modify the instance buffer and some other Metal related variables commit the command buffer Depending on the number of frames used and the complexity of the scene there can be a couple of frames in the command queue. Suppose the window (and its related view) is closed while Metal is still busy with items in the command queue. This means that the semaphore is still in use. How is it guaranteed that the semaphore is destroyed after the view is closed? Or is it guaranteed that the view's destructor is only called after the command queue has finished all its work?
1
0
854
Sep ’22
UIDocumentPickerViewController cannot associate thumbnails for text file
I am intializing a UIDocumentPickerViewController with the UTIs public.text and public.text-plain. UIDocumentPickerViewController* documentPickerController = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:[NSArray arrayWithObjects:@"public.text",@"public.text-plain",nil] inMode:UIDocumentPickerModeImport];When selecting a text file I get the error message "Failed to associate thumbnails for picked URL file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/NIC.txt with the Inbox copy file:///private/var/mobile/Containers/Data/Application/B857A5E7-74FE-4479-B899-B61D524B7E0D/tmp/xxx-Inbox/NIC.txt: Error Domain=QLThumbnailErrorDomain Code=102 "(null)" UserInfo={NSUnderlyingError=0x28250df20 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found" UserInfo={NSDescription=Generation not found}}}".What can I do to get rid of this error message?
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
4.4k
Mar ’22
How to hide UISearchController from navigation item?
In iOS 11.0+ I use the following statements to add a UISearchController to the navigation bar:[[self navigationItem] setSearchController:[self myUISearchController]]; [[self navigationItem] setHidesSearchBarWhenScrolling:NO]; [self setDefinesPresentationContext:YES];To hide the UISearchController I tried the following:[[self myUISearchController] setActive:NO]; [[self myUISearchController] removeFromParentViewController]; // just a try [[self navigationItem] setSearchController:nil]; // this should be sufficient [self myUISearchController:nil];Actually, the search controller disappears but leaves a black rectangle at the position where it was. It seems to be that the UITableViewController inside the UINavigationController does not re-align its table view and therefore leaves a black rectangle.Any ideas?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
3.1k
Mar ’22
Sorting source code files in Xcode's navigator
Since Xcode 16 sorting source code files in the navigator with ascending order by name results in: A.hpp A.cpp B.hpp B.cpp ... Previous versions of Xcode sorted the files correctly (with respect to ascending order): A.cpp A.hpp B.cpp B.hpp Is this a bug or is there any parameter I have to set to get the old ordering back?
Replies
0
Boosts
1
Views
406
Activity
Oct ’24
LearnMetalCpp examples: why not crashing because of used semaphore?
The examples in LearnMetalCpp do in the renderer's draw method something like this: select a frame for the instance buffer create a new command buffer call dispatch_semaphore_wait to make sure that the selected instance buffer is not used by Metal put dispatch_semaphore_signal into the command buffer's completed handler modify the instance buffer and some other Metal related variables commit the command buffer Depending on the number of frames used and the complexity of the scene there can be a couple of frames in the command queue. Suppose the window (and its related view) is closed while Metal is still busy with items in the command queue. This means that the semaphore is still in use. How is it guaranteed that the semaphore is destroyed after the view is closed? Or is it guaranteed that the view's destructor is only called after the command queue has finished all its work?
Replies
1
Boosts
0
Views
854
Activity
Sep ’22
UIDocumentPickerViewController cannot associate thumbnails for text file
I am intializing a UIDocumentPickerViewController with the UTIs public.text and public.text-plain. UIDocumentPickerViewController* documentPickerController = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:[NSArray arrayWithObjects:@"public.text",@"public.text-plain",nil] inMode:UIDocumentPickerModeImport];When selecting a text file I get the error message "Failed to associate thumbnails for picked URL file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/NIC.txt with the Inbox copy file:///private/var/mobile/Containers/Data/Application/B857A5E7-74FE-4479-B899-B61D524B7E0D/tmp/xxx-Inbox/NIC.txt: Error Domain=QLThumbnailErrorDomain Code=102 "(null)" UserInfo={NSUnderlyingError=0x28250df20 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found" UserInfo={NSDescription=Generation not found}}}".What can I do to get rid of this error message?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
3
Boosts
0
Views
4.4k
Activity
Mar ’22
How to hide UISearchController from navigation item?
In iOS 11.0+ I use the following statements to add a UISearchController to the navigation bar:[[self navigationItem] setSearchController:[self myUISearchController]]; [[self navigationItem] setHidesSearchBarWhenScrolling:NO]; [self setDefinesPresentationContext:YES];To hide the UISearchController I tried the following:[[self myUISearchController] setActive:NO]; [[self myUISearchController] removeFromParentViewController]; // just a try [[self navigationItem] setSearchController:nil]; // this should be sufficient [self myUISearchController:nil];Actually, the search controller disappears but leaves a black rectangle at the position where it was. It seems to be that the UITableViewController inside the UINavigationController does not re-align its table view and therefore leaves a black rectangle.Any ideas?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
3.1k
Activity
Mar ’22