Hi,
I'm testing one of my app on iOS 14 with Xcode 12 beta 3 (12A8169g) and I have a problem with my storyboards.
Xcode give me this error for all the storyboards that contain a split view controller:
An internal error occurred. Editing functionality may be limited.
The log generated by the Xcode "Report a bug" button say:
Exception name: NSInvalidArgumentException
Exception reason: UITabBarController is unsupported as viewController for -[UISplitViewController setViewController:forColumn:] in Primary column
It worked correctly on Xcode 12 beta 2.
Has anyone encountered the same problem and found a way to fix it?
Thank you
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
If we use white as tint color for an inline or compact UIDatePicker (iOS 14, dark mode) then if the today day is selected the number become unreadable.
The problem is that the today day number color is always white and, when selected, the background color is also white.
Anyone know a way to set the color of today's day number to black when is selected?
Thank you
Hi,
I am faced with a strange problem with a Catalyst app that uses MapKit.
If the map is visible and I resize the window (causing the map the resize), sometime the app crashes with some Metal related error.
Is this a know issue between MapKit and Catalyst?
There is something I can do in order to prevent this crash?
Below you can find the error message and a screenshot of the thread that caused the crash.
Thank you
-[MTLDebugDevice notifyExternalReferencesNonZeroOnDealloc:]:2951: failed assertion `The following Metal object is being destroyed while still required to be alive by the command buffer 0x7f96de27f600 (label: <no label set>):
<MTLToolsObject: 0x7f96dde552e0> -> <BronzeMtlTexture: 0x7f96dc04c230>
label = <none>
textureType = MTLTextureType2D
pixelFormat = MTLPixelFormatBGRA8Unorm_sRGB
width = 2372
height = 1668
depth = 1
arrayLength = 1
mipmapLevelCount = 1
sampleCount = 1
cpuCacheMode = MTLCPUCacheModeDefaultCache
storageMode = MTLStorageModeManaged
hazardTrackingMode = MTLHazardTrackingModeTracked
resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModeManaged MTLResourceHazardTrackingModeTracked
usage = MTLTextureUsageShaderRead MTLTextureUsageRenderTarget
shareable = 0
framebufferOnly = 0
purgeableState = MTLPurgeableStateNonVolatile
swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha]
isCompressed = 0
parentTexture = <null>
parentRelativeLevel = 0
parentRelativeSlice = 0
buffer = <null>
bufferOffset = 0
bufferBytesPerRow = 0
iosurface = 0x0
iosurfacePlane = 0
allowGPUOptimizedContents = YES'
Hi!I currently developing a mobile website and found that Safari on iOS has some problems setting the focus on inputs when they are inside an iframe.When in a page you have many inputs you can tap on a field and then use the next / previous buttons on the keyboard to navigate between the fields. When the focus move to another input Safari scroll automatically the page centering the field in the page. This is great and works well.The problem is when the fields are inside a page of an iframe. In this case when you change focus from one field to another Safari has some kind of issue; the page “bounce” and the focused field is not centered in the page.I have made a video of a simple page that has this issue. In the first part of the video the page without the iframe is loaded and the focus works correctly. In the second part the page with the iframe is loaded and the issue is visible.http://www.dale1.ch/documents/safari_iframe_focus_issue.movThe code of the first page (testinput.html) where the focus is correctly handled is this:<!DOCTYPE html>
<html>
<head>
<title>Test input</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<div><span>Input 1: </span><input type="text" tabindex="1" /></div>
<div><span>Input 2: </span><input type="text" tabindex="2" /></div>
<div><span>Input 3: </span><input type="text" tabindex="3" /></div>
<div><span>Input 4: </span><input type="text" tabindex="4" /></div>
<div><span>Input 5: </span><input type="text" tabindex="5" /></div>
<div><span>Input 6: </span><input type="text" tabindex="6" /></div>
<div><span>Input 7: </span><input type="text" tabindex="7" /></div>
<div><span>Input 8: </span><input type="text" tabindex="8" /></div>
<div><span>Input 9: </span><input type="text" tabindex="9" /></div>
<div><span>Input 10: </span><input type="text" tabindex="10" /></div>
<div><span>Input 11: </span><input type="text" tabindex="11" /></div>
<div><span>Input 12: </span><input type="text" tabindex="12" /></div>
<div><span>Input 13: </span><input type="text" tabindex="13" /></div>
<div><span>Input 14: </span><input type="text" tabindex="14" /></div>
<div><span>Input 15: </span><input type="text" tabindex="15" /></div>
<div><span>Input 16: </span><input type="text" tabindex="16" /></div>
<div><span>Input 17: </span><input type="text" tabindex="17" /></div>
<div><span>Input 18: </span><input type="text" tabindex="18" /></div>
<div><span>Input 19: </span><input type="text" tabindex="19" /></div>
<div><span>Input 20: </span><input type="text" tabindex="20" /></div>
<div><span>Input 21: </span><input type="text" tabindex="21" /></div>
<div><span>Input 22: </span><input type="text" tabindex="22" /></div>
<div><span>Input 23: </span><input type="text" tabindex="23" /></div>
<div><span>Input 24: </span><input type="text" tabindex="24" /></div>
<div><span>Input 25: </span><input type="text" tabindex="25" /></div>
<div><span>Input 26: </span><input type="text" tabindex="26" /></div>
<div><span>Input 27: </span><input type="text" tabindex="27" /></div>
<div><span>Input 28: </span><input type="text" tabindex="28" /></div>
</body>
</html>This is the code of the page that has the issue (testinput_iframe.html):<!DOCTYPE html>
<html>
<head>
<title>Test input</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<iframe src="/testinput.html" />
</body>
</html>The issue is present in Safari on the iPhone, iPad and the xCode Simulator from version 8.4 to version 9.2.Someone know if this is a bug? There is way to fix it in css or javascript?Thanks and sorry for my english! 😉
Hi!
When using a diffable data source on iOS 13 and iOS 14 in combination with a fetched result controller, the didChangeContentWith method of the NSFetchedResultsController delegate return a new snapshot with inserted, deleted and moved items.
Unfortunately, in the new snapshot items that have been modified are not refreshed.
That's because the system appears to compare the identifiers to determine whether a refresh is needed or not.
If we change an attribute of a Core Data entity the identifier remain the same and the item in the snapshot is not refreshed.
For this reason, on iOS 13 and iOS 14, we need to manually check which objects have been updated and manually refresh the corresponding items in the snapshot.
Now, it seems that on iOS 15 this is no more needed.
The new snapshot I receive in the NSFetchedResultsController didChangeContentWith delegate method also contain refreshed items.
So, in order to apply the new snapshot I only need to call a single line of code:
func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChangeContentWith snapshot: NSDiffableDataSourceSnapshotReference) {
guard let diffableDataSource = diffableDataSource else {return}
diffableDataSource.apply(snapshot as NSDiffableDataSourceSnapshot<Section, NSManagedObjectID>, animatingDifferences: true)
}
That's great, but I'm not sure if that's a feature we can count on from iOS 15 onwards.
Is this new behaviour documented somewhere?
Thank you
Hi,
It seems that when using the inset grouped style in a UITableView, the cells are not aligned with the navigation bar large title.
However, I've noticed that all Apple apps that seem to use this style (Settings, Notes) don't have this issue and the cells are perfectly aligned with the title.
In the below example you can see that the cells of an inset grouped table are not aligned with the title (extra space between the red line and the cells) but the one's of the Apple apps are perfectly aligned.
Do you know if there is a way to change the left and right cells margins of an inset grouped table in order to align them with the large title?
Thank you
Hi,
I have a UITextView with allowsEditingTextAttributes set to true.
On iOS 15 and before, users can select part of the text and tap on the BIU button in order to set the text to bold, italic or underline. On iOS 16 the BIU button is missing.
How can the user change the formatting of the text contained inside an UITextView on iOS 16? There is something I need to specify on UITextView?
Thank you
I need more time to adapt to the new iOS 26 UI, so I set the "UIDesignRequiresCompatibility" attribute to "Yes."
This works, but now all large titles are not aligned with the content.
Below you can see an example, but I have the issue with all large titles.
All good on iOS 18.
Does anyone have an idea why and how can i fix it?
Hi!I hope someone can help me.A user told me that my app crashes when scrolling a tableView on iOS 13.1.2.I received the crash log and the error it’s just crazy.The crash log indicate that the error is at the first line inside the trailingSwipeActionsConfigurationForRowAt method.override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
guard items.count > indexPath.row else {return nil} //This line crash.
…
}The items property is defined as:private var items = [AnyObject]()The error is EXC_BREAKPOINT (SIGTRAP).How can this line of code crash? items is a non optional variable and indexPath is also a non optional struct.It's as if indexPath.row was deliberately creating an EXC_BREAKPOINT exception. It is possible?Another strange thing is that the user say that the app crash during scrolling. It seems that the method trailingSwipeActionsConfigurationForRowAt is called during scroll. That's also strange, it should not be called only when the user does a left swipe? Maybe it has something to do with some accessibility feature because in the call stack of crash report I see some system accessibility methods calls (see crash report below).Has anyone any ideas that can help me or has encountered a similar problem?Thank youException Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001de522a94
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [1431]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libswiftUIKit.dylib 0x00000001de522a94 $s10Foundation9IndexPathV5UIKitE7sectionSivgTm + 52
1 libswiftUIKit.dylib 0x00000001de522a78 $s10Foundation9IndexPathV5UIKitE7sectionSivgTm + 24
2 MYAPP 0x000000010219ca4c specialized GroupTableViewController.tableView(_:trailingSwipeActionsConfigurationForRowAt:) + 272 (GroupTableViewController.swift:714)
3 MYAPP 0x0000000102194544 @objc GroupTableViewController.tableView(_:trailingSwipeActionsConfigurationForRowAt:) + 136 (:0)
4 UIKitCore 0x00000001ad6ae200 -[UITableView _trailingSwipeConfigurationAtIndexPath:fromRemoveButton:] + 2140 (UITableView.m:16580)
5 UIKit 0x00000001de7889f0 -[UITableViewCellAccessibility _privateAccessibilityCustomActions] + 544 (UITableViewCellAccessibility.m:3153)
6 UIAccessibility 0x00000001b49e6228 -[NSObject(AXPrivCategory) _retrieveCustomActionsForElement:] + 72 (NSObjectAccessibility.m:2973)
7 UIAccessibility 0x00000001b49e650c -[NSObject(AXPrivCategory) _accessibilityCustomActions] + 260 (NSObjectAccessibility.m:3021)
8 UIAccessibility 0x00000001b49e9978 -[NSObject(AXPrivCategory) _accessibilityCustomActionNamesAndIdentifiers] + 68 (NSObjectAccessibility.m:3683)
9 UIAccessibility 0x00000001b49f07bc -[NSObject(AXPrivCategory) _iosAccessibilityAttributeValue:] + 6580 (NSObjectAccessibility.m:6542)
10 UIAccessibility 0x00000001b49d1d9c _copyMultipleAttributeValuesCallback + 544 (UIAccessibilityRuntime.m:344)
11 AXRuntime 0x00000001b39fc834 ___AXXMIGCopyMultipleAttributeValues_block_invoke + 64 (AccessibilityPriv.m:1192)
12 AXRuntime 0x00000001b39fc3a8 _handleNonMainThreadCallback + 68 (AccessibilityPriv.m:467)
13 AXRuntime 0x00000001b39fc6b8 _AXXMIGCopyMultipleAttributeValues + 304 (AccessibilityPriv.m:1191)
14 AXRuntime 0x00000001b39f658c _XCopyMultipleAttributeValues + 396 (AccessibilityClientDefsServer.c:1354)
15 AXRuntime 0x00000001b3a0bd28 mshMIGPerform + 272 (MachServerHelper.c:447)
16 CoreFoundation 0x00000001a939d91c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60 (CFRunLoop.c:1937)
17 CoreFoundation 0x00000001a939cfe8 __CFRunLoopDoSource1 + 448 (CFRunLoop.c:2075)
18 CoreFoundation 0x00000001a9397c20 __CFRunLoopRun + 2144 (CFRunLoop.c:3098)
19 CoreFoundation 0x00000001a9397098 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
20 GraphicsServices 0x00000001b3501534 GSEventRunModal + 108 (GSEvent.c:2246)
21 UIKitCore 0x00000001ad4b77ac UIApplicationMain + 1940 (UIApplication.m:4753)
22 MYAPP 0x000000010209cae8 main + 68 (PlaceViewController.swift:25)
23 libdyld.dylib 0x00000001a9216f30 start + 4
Hi!I noticed a strange behavior on MapKit when using the iOS 11 clustering feature.If you add some annotations on a map (with same clusteringIdentifier and same displayPriority) MapKit will correctly merge together annotations that are close.The problem is that if you remove all the annotations and then you add them back the map will no more merge the annotation together. It’s like the clustering feature simply stop working.I don’t really know if it is a bug or if I miss something.Someone else have noticed this?Alan
Hi,
Sometimes it is useful to show a movie to better explain the behaviour of something. Animated gifs would be perfect for this purpose.
Unfortunately it doesn't seem possible to include animated gifs in posts. When I try to do it (using the "Add Image" feature) I always got this error message:
Will the attachment of animated gifs be supported in the future? If not, what is the recommended way to include a short movie in a post?
Thank you
Hi,
This is how I'm currently configuring an UICollectionView sidebar cell.
let rowRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, SidebarItem> {
(cell, indexPath, item) in
var contentConfiguration = UIListContentConfiguration.sidebarSubtitleCell()
contentConfiguration.text = item.title
contentConfiguration.secondaryText = item.subtitle
contentConfiguration.image = item.image
cell.contentConfiguration = contentConfiguration
}
In order to specify the selection background color of the cell I'm setting the backgroundConfiguration property.
This work as expected:
let rowRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, SidebarItem> {
(cell, indexPath, item) in
var contentConfiguration = UIListContentConfiguration.sidebarSubtitleCell()
contentConfiguration.text = item.title
contentConfiguration.secondaryText = item.subtitle
contentConfiguration.image = item.image
cell.contentConfiguration = contentConfiguration
var backgroundConfiguration = UIBackgroundConfiguration.listSidebarCell()
backgroundConfiguration.backgroundColorTransformer = UIConfigurationColorTransformer { [weak cell] (color) in
if let state = cell?.configurationState {
if state.isSelected || state.isHighlighted {
return UIColor(named: "Primary")!
}
}
return .clear
}
cell.backgroundConfiguration = backgroundConfiguration
}
Now I also need to change the text color based on the cell selection.
When the cell is selected the text should be white.
I tried to set the colorTransformer of textProperties of contentConfiguration like so:
contentConfiguration.textProperties.colorTransformer = UIConfigurationColorTransformer { [weak cell] (color) in
if let state = cell?.configurationState {
if state.isSelected || state.isHighlighted {
return .white
}
}
return .black
}
Unfortunately the text color does not change after the cell has been selected.
What am I doing wrong? Can anyone help me?
Thank you
Hi,
I need to understand inside an override of UIBarButtonItem what is the systemItem of the button (done, add, trash, search, ...).
Unfortunately at the moment the only method I found is to inspect the content of self.description (see below), but this solution, as well as being ugly, is very fragile because we can't be sure that the description will be the same also on future version of iOS / Swift.
Someone know a better way to check for systemItem inside an UIBarButtonItem override class?
Thank you
class BarButtonItem: UIBarButtonItem {
override func awakeFromNib() {
super.awakeFromNib()
print(self.description)
}
}
<MyApp.BarButtonItem: 0x7fadbcacbea0> systemItem=Trash
Hi,
Inside a Mac Catalyst app, I need to display a popover starting from an NSToolbarItem contained inside the app toolbar (like the Apple Maps Mac app does, see below image).
In order to do that, when I press the button I need to find the toolbar item view and use it as popover anchor.
How can I find the view or frame of an NSToolbarItem on Mac Catalyst?
A property that could help me is the NSToolbarItem "view" property (NSView), but that property has been marked has unavailable in Mac Catalyst.
Any idea?
Thank you
Hi!I have a model with an antity that have a property that use the "Allows External Storage" option. For some reason the framework does not handle the files inside this directory correctly when some of the files have the SAME data.Basically the issue is:- You have an entity with a binary property that use the “Allows External Storage” option.- You create some entities and for every entities you put the same data in the binary property.- After saving Core Data will create inside the _EXTERNAL_DATA folder a file for every entity data.- You delete all the entities from the store.- Core Data will delete only a single file and all the other files are left in the directory forever.So if you create for example 10 identical entities (same data) with 1MB of data for every entity, after deleting all the entities from the store your _EXTERNAL_DATA folder will still contain 9MB of orphaned data that will stay there forever. 😟This bug is present in iOS 7, iOS 8 and iOS 9 beta 5.I have made a sample project that illustrate this behavior:http://www.dale1.ch/documents/delete_external_data_sample_project.zipI have filled a bug report (18319761) the 12 September 2014 with all the informations needed to reproduce the issue but unfortunally is still Open and I didn't received any feedback from Apple.Alan