Interface Builder

RSS for tag

Build interfaces for applications without writing code using Interface Builder, an editor within Xcode.

Interface Builder Documentation

Posts under Interface Builder tag

103 Posts
Sort by:
Post not yet marked as solved
1 Replies
1k Views
I updated MacOs to Sonoma and Xcode to 15 but when I want to preview some SwiftUI view, my project crashes. Some views don't crash but the others do. It started when I updated Xcode and my Mac. I also receive an error message, ld: warning: ignoring duplicate libraries: '-lc++' Please help, very confused. Thanks
Posted Last updated
.
Post not yet marked as solved
0 Replies
439 Views
Using VNDocumentCameraViewController, if the document is automatically scanned, it cannot be obtained in the func documentCameraViewController (_ controller: VNDocumentCameraViewController, didFinishWith scan: VNDocumentCameraScan) {}. If manual photography is used, data can be obtained May I ask how to solve it?
Posted
by vv12120.
Last updated
.
Post marked as solved
3 Replies
739 Views
I have a project with a fairly complex storyboard (~13k lines). The project builds fine with Xcode 14, both locally and on Xcode Cloud. However, on Xcode 15 Release (And also the last Beta version) opening the storyboard causes Xcode to crash, while trying to compile the project fails with a crash in ibtool. I've tried a few solutions to no avail. I've tried to isolate the build issue and try running ibtool locally to see if I get more output. This is what I get: /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text Main.storyboard 2023-09-20 18:54:17.690 ibtoold[289:56283117] [MT] DVTAssertions: ASSERTION FAILURE in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-22130/InterfaceBuilder/WidgetIntegration/IBUIAutolayoutGuide/IBUIViewAutolayoutGuideIntegration.m:481 Details: code which should be unreachable has been reached Object: <IBUIViewAutolayoutGuide: 0x6000068a6d00> Method: -ibPrimitiveAddConstraintsToCandidateListOnly:thatAreAlreadyInDocument: Thread: <_NSMainThread: 0x600001e241c0>{number = 1, name = main} Hints: Backtrace: 0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation) 1 _DVTAssertionHandler (in DVTFoundation) 2 _DVTAssertionFailureHandler (in DVTFoundation) 3 -[IBUIViewAutolayoutGuide(IBUIViewAutolayoutGuideIntegration) ibPrimitiveRemoveConstraintsFromCandidateListOnly:keepingInDocument:] (in IDEInterfaceBuilderCocoaTouchIntegration) 4 -[NSView(IBViewIntegration) ibMoveCandidateConstraint:toParent:alreadyInDocument:] (in IDEInterfaceBuilderKit) 5 -[NSView(IBViewIntegration) ibVerifyConstraintsAreWellFormedInDocument:subarbitrationUnitCache:andPopulateMessages:] (in IDEInterfaceBuilderKit) 6 -[IBDocumentVerifier _verifyConstraintsAndPopulateMessages:] (in IDEInterfaceBuilderKit) 7 -[IBDocumentVerifier verifyAndPopulateMessages:] (in IDEInterfaceBuilderKit) 8 -[IBCocoaTouchDocumentVerifier verifyAndPopulateMessages:] (in IDEInterfaceBuilderCocoaTouchIntegration) 9 -[IBiOSDocumentVerifier verifyAndPopulateMessages:] (in IDEInterfaceBuilderiOSIntegration) 10 -[IBiOSStoryboardDocumentVerifier verifyAndPopulateMessages:] (in IDEInterfaceBuilderiOSIntegration) 11 __41-[IBDocumentVerifier performVerification]_block_invoke (in IDEInterfaceBuilderKit) 12 -[IBDocumentAutolayoutManager ignoreAutolayoutStatusInvalidationDuring:] (in IDEInterfaceBuilderKit) 13 -[IBDocument ignoreAutolayoutStatusInvalidationDuring:] (in IDEInterfaceBuilderKit) 14 -[IBDocumentVerifier performVerification] (in IDEInterfaceBuilderKit) 15 -[IBDocument performVerification] (in IDEInterfaceBuilderKit) 16 -[IBDocument readFromURL:ofType:error:] (in IDEInterfaceBuilderKit) 17 IBLoadDocument (in ibtoold) 18 -[IBCLIInterfaceBuilderToolPersona invokeArguments:outputDictionary:] (in ibtoold) 19 -[IBCLIInterfaceBuilderToolPersona runSingleInvocation:outputtingToFileHandle:andVerifyingEnvironment:] (in ibtoold) 20 IBCLIServerRunSingleInvocation (in ibtoold) 21 __IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess_block_invoke_2 (in ibtoold) 22 __IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess_block_invoke (in ibtoold) 23 -[IBCLIErrorForwarder forwardErrorOutputToDescriptor:whileInvokingBlock:] (in ibtoold) 24 IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess (in ibtoold) 25 main (in ibtoold) 26 start (in dyld)
Posted
by zer0x.
Last updated
.
Post not yet marked as solved
0 Replies
332 Views
I'm not sure when it started (sometime before Xcode 15), but in Interface Builder, if I set the Height or Width to Relative to Container, the value I put in the numeric field displays as a rounded integer. In other words, if I set it to be 0.25, it displays as 0; if I set it to 0.75, it displays as 1. It does behave as the number I've entered. It's just frustrating when I'm trying to tweak my numbers and I have to write down what I've entered. Is this a bug in Xcode, or is there some oddball setting that I may have inadvertently changed?
Posted
by MowinMan.
Last updated
.
Post not yet marked as solved
0 Replies
290 Views
Hello Apple Developer community, I'm encountering an issue when trying to change the color of a component using a custom color in Xcode's Interface Builder. While I can easily set the background color to system colors like "System Pink," I'm facing difficulties when attempting to use custom colors. Problem Description: When I select the color wheel, color sliders, or color palettes to choose a custom color, the changes don't seem to apply to my components. Steps I've Taken to Resolve the Issue: I have updated my macOS to the latest version. I've ensured that Xcode is up to date. I've even tried reinstalling Xcode from scratch. I've deleted derived data and cleared caches as part of troubleshooting. Additional Information: I've recorded a video demonstrating the issue, which you can view (https://drive.google.com/file/d/1q2fztiAOwvDM5t-k1eMbfBULobcJZiax/view?usp=share_link) I'm looking for guidance on how to successfully set a custom background color for my UIView in Interface Builder. Has anyone else experienced this issue or found a solution? Any help or insights would be greatly appreciated. Thank you in advance for your assistance!
Posted
by tommyCSS.
Last updated
.
Post not yet marked as solved
0 Replies
496 Views
I am having a problem configuring popup buttons for a macOS application, using the Interface Builder mechanisms of Xcode (14.3.1). I am prepared to report the issue as a bug, but I thought I would check here to see if I had overlooked something in my configuration efforts: Briefly, I wish to have a popup button in my app's main window (not in the menu bar), that has a bezel color of "System Orange Color" and that uses white lettering for its title. My app has a lot of buttons, and for all the other button types I have used, when I set the bezel color to System Orange or to some similarly dark-ish color, the title lettering automagically comes up white. That of course also happens for the popup buttons that are part of the menu bar -- their titles have white lettering -- but when I place a popup button in the main window of my app, its title comes up with black letters no matter what I do. This is solely an aesthetic problem -- the popup button works perfectly well, it just looks out of place because its lettering doesn't match the other buttons. The misbehaving popup button is configured via Xcode only -- no commands sent from code. Its Xcode configuration settings include Pull Down, No Arrow, Bevel, Momentary Push In, System Orange Color, System Regular (font), and No Image.
Posted
by Knightley.
Last updated
.
Post not yet marked as solved
2 Replies
356 Views
I have a NSTableView which shows a list of translated text items. I want to provide a Find Bar for user to filter through the items, like the one I have in Xcode. Of course I don't want so many features; I only want to let user enter some text.
Posted
by imneo.
Last updated
.
Post not yet marked as solved
1 Replies
468 Views
Hi all, My interface displays a text field bound to an NSNumber that I use internally as unsigned int. That NSNumber is actually saved with Core Data as Integer 16. However, the interface displays the number signed, meaning anything above 32.768 is actually shown to be negative. I couldn't find a way to force my NSNumberFormatter to display unsigned numbers. Setting the minimum value to 0 also doesn't work, since internally it's gonna be positive anyway. Could you help me display my 16-bit integer as an unsigned int between 0 and 65.535? I am building a macOS app using Objective-C, macOS SDK 10.14 and Xcode 14.3.1.
Posted Last updated
.
Post not yet marked as solved
2 Replies
2k Views
Xcode indexing will cause my Mac Mini (M1) to crash when indexing is active (ON). ===> Xcode Version 12.5.1 (12E507) To test the following, I created a smaller OSX desktop application, compared to my main OSX desktop application, which is significantly larger in scope, and size. That said, I enter the following code in the terminal to activate and deactivate Xcode Indexing: 1. Indexing is active (ON) when applied in the terminal : defaults write com.apple.dt.XCode IDEIndexDisable 0 2. Indexing is NOT active (OFF) when applied in the terminal : defaults write com.apple.dt.XCode IDEIndexDisable 1 The application causing the crash with Xcode Indexing turned (ON), creates a PList file for my main application to use, which is an array of dictionary tuples. This application for the moment, creates a baseline array of 4,000+ dictionary objects with eight (8) tuple objects per dictionary. I use the same design with different, and significantly less information to create other PList array of dictionary objects, such as creating a PList array of dictionary objects for one column of objects instead of my application’s eight tableView columns. The smaller PLlist array of dictionary objects for an identified tableView column contains numeric information, which my application analyses to provide statistical data, such as mean, median, mode, maximum, minimum, number of occurrences, histograms, charts, et al. The smaller PList column application does not crash when Xcode Indexing is active (ON). When Xcode Indexing is active (ON) for the larger PList application the following occurs: 1. Xcode quickly usurps all the RAM in my Mac Mini (M1 - 16 GB). 2. Activity Monitor shows “SourceKitService” climbs steadily to (20 GB) from (140 MB). 3. Activity Monitor shows “swift-frontend” climbs steadily to (80 GB) from (1 GB). 4. Activity Monitor shows “Physical Memory: 16 GB” 5. Activity Monitor shows “Memory Used: 14.01 GB” 6. Activity Monitor shows “Cached Files: 1.91 GB” 7. Activity Monitor shows “Swap Used: 29.49 GB” 8. Activity Monitor shows “App Memory: 3.69 GB” 9. Activity Monitor shows “Wired Memory: 1,012.5 MB” 10. Activity Monitor shows “Compressed: 8.53 GB” 11. Activity Monitor shows “Memory Pressure: Max” My Mac Mini (M1) does not hesitate to show the Force Quit Modal: “Your system has run out of application memory.” Xcode ===> (“Xcode set at 309.0 MB”) Finder ===> (“Finder set at 158.2 MB”) Boom, I must restart my computer. When Xcode Indexing is NOT active (OFF) the following occurs: 1. The Mac Mini (M1) does not crash. 2. My application will NOT allow me to connect to any viewController outlet in my application from any IB. 3. Attempting a connection from IB to the associated properly named “viewController” presents the following error message: ===> Could not insert new action connection: could not find any information for the class named “blah blah blah …” <=== This exercise to turn “ON” and turn “OFF” Xcode indexing for my situation is repeatable. Turning (OFF) Xcode indexing introduces the above "Could not" error message, and turning (ON) Xcode indexing prevents the error message from showing with my smaller indexed applications. So, for the moment, I can manually create an outlet in the “viewController” with copy and paste, “change” the new outlet name and function, then “connect” the IB item to the new viewController outlet, using “control-drag.” This “get-by-product” effort allows me to continue making connections without frustration. For me, and my Mac Xcode programming experience, when Xcode Indexing is “OFF,” all the other internet suggestions to fix the “Could not insert new action connection” failed miserably. Those suggestions obviously worked for the individual poster, but unfortunately not for me. When Xcode crashes with this error, my computer asks to send the issue to Apple, so I say “Yes.” This experience blindly took me more than two months to isolate my application issue, through trial and error, trying to follow the numerous suggestions on the internet to no avail. I turned OFF Xcode Indexing a few months ago to prevent the larger indexing application from crashing. My efforts to resolve the “Could not insert new action” message included: 1. Creating new view controllers. 2. Copying the original viewController code into the new viewController. 3. Clean and rebuild. 4. Delete derived folders. 5. Reviewing possible “Automatic and Manual” assistant editor issues. 5. Believing my suspect object copy methods from one IB to another IB, caused the issue, therefore causing me to rebuild an IB or two from scratch. The Xcode Index crashing issue, and the subsequent “Could not insert new action” issue happens to be annoying, but I am able to continue programming my application without Xcode indexing. My main concern and my current dilemma right now happens to be, what will become of my application, since I cannot index the application without Xcode indexing causing my Mac Mini (M1) to crash … ? Just curious … :] All suggestions, as always, are welcome. Best regards, jim_k
Posted
by jim_k.
Last updated
.
Post not yet marked as solved
1 Replies
783 Views
I am very new to Swift and I am trying to use this function so my app doesn't trigger the Apple Pay notification. (requestAutomaticPassPresentationSuppression) I am working on react-native. I am trying to create a native module so I can import this function but I am very new to Swift. At this point, I am a bit stuck. Any help would be great. Thank you
Posted Last updated
.
Post not yet marked as solved
7 Replies
2.2k Views
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
Posted
by DaleOne.
Last updated
.
Post not yet marked as solved
2 Replies
663 Views
This is a very annoying error which is causing a crash in my app. The error description is very vague and I'm guessing mostly related to oddities of Xcode 15 Beta. Here is the full error stack: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' *** First throw call stack: ( 0 CoreFoundation 0x00007ff80048c88a __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff800057894 objc_exception_throw + 48 2 CoreFoundation 0x00007ff80048c768 -[NSException initWithCoder:] + 0 3 UIFoundation 0x00007ff804a1eb4d UINibDecoderDecodeObjectForValue + 352 4 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233 5 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 6 UIKitCore 0x000000010e566a9f -[UIView initWithCoder:] + 1327 7 UIKitCore 0x000000010e4ed417 -[UIScrollView initWithCoder:] + 65 8 UIKitCore 0x000000010e34cbd5 -[UITextView initWithCoder:] + 65 9 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711 10 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 11 UIKitCore 0x000000010d97e7f0 -[UIRuntimeConnection initWithCoder:] + 160 12 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711 13 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233 14 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 15 UIKitCore 0x000000010d977a79 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 447 16 UIKitCore 0x000000010d97a77e -[UINib instantiateWithOwner:options:] + 1118 17 UIKitCore 0x000000010d532dab -[UIViewController loadView] + 643 18 UIKitCore 0x000000010d533128 -[UIViewController loadViewIfRequired] + 129 19 UIKitCore 0x000000010d533960 -[UIViewController view] + 27 .... Has anyone found the solution to this issue? This is preventing us from fully validating our iPadOS 17 upgrade builds. Thanks in advance.
Posted Last updated
.
Post not yet marked as solved
4 Replies
1.1k Views
Hello I'm encountering a strange error, probably linked to a bug in Xcode 15 beta 2. When running my app from xcod 15 Beta 2 (either on device running iOS16.5.1 or any simulator running iOS17) for some views I receive the following fatal error: 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named StopwatchSupport.ActivityIndicatorVisualStyle because no class named StopwatchSupport.ActivityIndicatorVisualStyle was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' From the stack trace, the error seems to be appearing just afterthos calls: #3 0x00000001b3faef54 in UINibDecoderDecodeObjectForValue () #4 0x00000001b3faf1ec in UINibDecoderDecodeObjectForValue () Thanks for any help guidance provided.
Posted
by arex.
Last updated
.
Post not yet marked as solved
0 Replies
410 Views
When porting an old Mac project to Silicon (universal) I got an issue with IB to open MainMenu.xib: Trust opening older file format? “MainMenu.xib” uses an older format that is potentially insecure when decoded. If you trust the content of this file, open and save it to upgrade to the modern format. The "open and Upgrade" button make the MainMenu.xib not editable: it seem that every submenus has disappeared. How can I fix it ? Any suggestion will be greatly appreciate.
Posted
by Alain_B.
Last updated
.
Post marked as solved
3 Replies
2.3k Views
After I've updated to Xcode 15 beta 2, I'm getting these build time errors, which I didn't see in beta 1. Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x600002588860> System content for IBRealityIdiom-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600002588b60> scaleFactor=2x, renderMode.identifier=(null)'. I've tried - restarting the Xcode15 beta 2, re-installing Xcode 15 beta 2 and also its Commnad Line Tools Restarting the macOS (twice) However, nothing has worked so far. I'd appreciate any suggestions or ideas as to how to fix this issue, because I'm stuck without being able to build the projects. Thanks in advance!
Posted Last updated
.
Post marked as solved
2 Replies
1.2k Views
I added a scene to an existing story board that already has other scenes. I put focus on the new scene, and in the Identity Inspector's "Class" field I gave it a class name. The "Storyboard ID" field did not show in this inspector. Why would it not? No file named after the class name I gave it appeared in the "Project navigator". Is this supposed to happen automatically? Or must I create this Swift file that contains the class definition for the scene manually?
Posted
by spflanze.
Last updated
.
Post marked as solved
1 Replies
602 Views
Hello, I am a first-time app developer and I have not posted on forums before, so please bear with me if my question is basic or amateur. I have created an app on Xcode with storyboard. I have not added any code yet except for the AppDelegate, Scene Delegate, and View Controller files which are automatically added when the project is created. When I try to build, I get the following error: Description: Internal error. Please file a bug at feedbackassistant.apple.com and attach "/var/folders/w5/32zs74y9287ddqdp_yjkkdbw0000gn/T/IB-agent-diagnostics_2023-07-09_09-58-08_842000" I have filed a bug, but was wondering if any of you know of a workaround. Looking into Log.txt, I see the following error: Failed to compile nib consisting of IBCLLocationButton (x1), IBMKMapView (x1), IBProxyObject (x4), IBUIButton (x3), IBUIContainerView (x2), IBUIView (x2), IBUIViewAutolayoutGuide (x1), and IBWKWebView (x1). Exception name: NSInvalidArgumentException Exception reason: UIImage instances should generally not be encoded in NIBs - attempting to encode '<UIImage:0x6000002b1830 anonymous {41, 41} renderingMode=automatic(original)>' for key 'UIImage' of <UIImageView: 0x7f7e45f32a60; frame = (0 0; 41 41); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x60000311c8c0>> My Main.storyboard file consists of a scrollview, with a table view inside. The table view has a custom prototype cell. My Xcode version is 14.2, and my deployment target is ios 16.2. I am using MacOS Monterrey. I have seen similar errors being discussed on this forum and others, but none exactly pertaining to the specific platform I am using. I have already tried cleaning the build folder and resetting my image views. Any help would be appreciated. Thank you.
Posted
by SMitra1.
Last updated
.