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

142 Posts
Sort by:
Post not yet marked as solved
1 Replies
151 Views
I have created a UIButton in storyboard, and have set an image for the UIButton (the image is in assets.xcassets). The button shows up in the simulator and when run on an iPhone. However, if I quit the app on the iPhone and open it again, the button disappears, but I am still able to click it and it works. The same thing happens when I uncheck "debug executable." When I check the view hierarchy, the button is on top of the hierarchy but is invisible. Using infoButton.isHidden = false also does not work. In my button's view controller, I have called view.bringSubviewToFront(_: infoButton) in viewDidLoad(). I have also tried setting the button's image programmatically, but it still doesn't show up. However, when I set a background color for the button with infoButton.backgroundColor = UIColor.blue, I can see a blue box where the button should be, but no image. Here are my settings for the UIButton: I would appreciate any help, thank you.
Posted
by rainypuns.
Last updated
.
Post not yet marked as solved
1 Replies
177 Views
Xcode 13.4.1 Last Week Reviewed my applications UI last week in Xcode: everything was fine. This Week Opened it this morning, and my Storyboards (xib files) no longer display content. Directly under the file path view, there is the following: An internal error occurred. Editing functionality may be limited. Report a Bug What I've Tired Cleaning the build folder, no change. Quit Application, ReOpened, no change. Quit Application, Deleted "Derived Data" folder, ReOpened, no change. Clicked "Report a Bug" application was unresponsive, had to force quit, no change. Nothing Changed I've not made any code changes in over a week. Completely perplexed to see this behavior. The following shows the Xcode window and how StoryBoards are appearing. I'm not panicking, yet. That will come next week when I begin to make updates.
Posted Last updated
.
Post not yet marked as solved
0 Replies
95 Views
Hello i need help. The current version of the app contains the option to be for iphone and ipad, in this next version I would like to leave the option only for iphone and is that possible? I say because when sending the .ipa to the store as the iphone only option generates an error. Tks
Posted Last updated
.
Post not yet marked as solved
0 Replies
119 Views
I have an older MacOS app where in IB (no storyboards) I created a main window/view and a progress window/view in one xib in response to a menu item. In a new MacOS app (using much of the code from the older menu item code), in IB storyboard I have a window controller/window/view/subviews in the storyboard, but I cannot seem to find a way to also include in the storyboard a progress panel (to hook up to an outlet in the view controller). I can create the same window/panel/progress bar that I had in the older app in a separate xib. So I suppose (in objective c) I can just load the xib??? So, is there a better way to implement a separate progress window(s) in a storyboard and hook them up to outlets? I think I'm missing something And what happened to NSPanels?
Posted
by DrMiller.
Last updated
.
Post not yet marked as solved
0 Replies
109 Views
IDE: Xcode I have the following code in my program sending this command in terminal. Program hangs up on this line and the debug area shows error "no module named pyvisa_py". (power_max.py import the pyvisa module) Then I try this command in terminal directly and the module pyvisa_py, installed already, can be found. The python file can be executed successfully. How could I make Xcode identify the pyvisa_py module? [cmd appendString:@“python3 /Users/shared/power_max.py”];     [cmd appendString:[Paremeter_IP stringValue]];     [cmd appendString:@" > /users/Shared/CMW.txt"];     system([cmd UTF8String]);
Posted
by kp008114.
Last updated
.
Post not yet marked as solved
0 Replies
136 Views
Hello Angels, I downloaded XCode 13.4.1 yesterday. To learn how to create Apple Apps. There should be a storyboard file. That enables users to create labels and buttons etc. However, the feature is not present. However, it should be part of the application. What are my options? What should I do? I uninstalled the application and then reinstalled it. This did not fix the problem.
Posted Last updated
.
Post not yet marked as solved
0 Replies
95 Views
Hello, I have a GL6110 USB transmitter. I am using a macOS 12.4 computer and I managed with coolterm to send and receive SMS Here are the commands I used receive text messages AT+CMGL="ALL" then enter Send a text message AT+CMGS="+33xxxxxxxx6" and enter my text and CRTL+Z What I'm trying to do now is to read or send my SMS not by CoolTerm BUT by Xcode Is it possible to configure GL6110 on Xcode and go through Xcode to send/receive my SMS? Thanks
Posted
by sg72.
Last updated
.
Post not yet marked as solved
2 Replies
228 Views
I am developing an app to run on iOS 12.4 or newer using Xcode 12.3 on MacOS Catalina. On my screens I have a number of navigation bar buttons which have a system icon specified as well as text in Interface Builder. When running on an iOS 14.3 simulator, the bar button icons appear but on an iOS 12.4 simulator (and an iOS 12.4 device) the icons do not appear and only text is shown. The buttons still work OK on iOS12.4. How can I make system icons appear in Navigation bar button items in Xcode 12.4?
Posted Last updated
.
Post not yet marked as solved
0 Replies
203 Views
When I connect the iPad with my MacBook pro the iPad is not visible on the device and simulator option in Xcode. When I connect the device it just blinks and disappeared from the device and simulator option. I check the photos apps there I am able to see the device but in the Xcode, the device is not showing. Can anyone suggest to me how to fix this? Thanks in advance.
Posted Last updated
.
Post not yet marked as solved
0 Replies
132 Views
Just revisiting Xcode 13.4 in some time for a MacOS Automator Action and literally cannot find, Google or Developer support, how parameters (a tab in Automator Info for the target) can be linked to UI objects in a xib (not SwiftUI) or how to access those parameters in Objective C code. I cannot even find Xcode documentation on this topic in Developer at https://developer.apple.com/documentation/xcode and my search for "Xcode parameters" does not help. So, could someone please direct me to where this is covered in documentation?
Posted
by DrMiller.
Last updated
.
Post not yet marked as solved
1 Replies
188 Views
Show-message function got error: Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) following is the function. -(void)showMeg:(NSString *)str { dispatch_sync(dispatch_get_main_queue(), ^{ [[[Memo1 textStorage] mutableString]appendString:[NSString stringWithFormat:@"%@", str]]; [Memo1 scrollRangeToVisible:NSMakeRange(Memo1.string.length, 0)];//auto scroll down }); } I called it in other .m file like the following. -(void)showMeg:(NSString *)str { dispatch_sync(dispatch_get_main_queue(), ^{ [[[Memo1 textStorage] mutableString]appendString:[NSString stringWithFormat:@"%@", str]]; [Memo1 scrollRangeToVisible:NSMakeRange(Memo1.string.length, 0)];//auto scroll down }); }
Posted
by kp008114.
Last updated
.
Post marked as solved
4 Replies
15k Views
HiI recently updated to Xcode 11 GM seed. However I've noticed that the dreaded "Unknown class in Interface Builder file" is crashing my app. I haven't changed any class names or storyboards. Interestingly the app runs perfectly in teh simulator, but crashed on my phone.Here is what is being printed in the output window:MyAppName[9513:4230222] Unknown class _TtC10MyApp24SlideTableViewController in Interface Builder file.Could not cast value of type 'UIViewController' (0x1ebe282b0) to 'MyApp.SlideTableViewController' (0x104d05e08).MyAppName[9513:4230222] Could not cast value of type 'UIViewController' (0x1ebe282b0) to 'MyApp.SlideTableViewController' (0x104d05e08).I've deleted the class and recreated, removed the View Controller from the story board, made sure the view controller is references correctly as is the target, but the problem persists and I'm out of ideas.Is there a "reset" of the storyboard to reference the elements? Or some other way to resolve this?Many thanksCraig
Posted
by craigaps.
Last updated
.
Post not yet marked as solved
27 Replies
13k Views
I'm using XCode 8.2.1 on a MacBook Pro using the most recent macOS.I just finished rewriting one of my early iOS apps in Swift to get it back on the store. It would be useful to some if it were available to run on laptops, so I thought it might be not too difficult to port it over to macOS.Right now, for some reason the zoom controls are not present or working for the storyboard, so you cannot back out and see a complex storyboard clearly. It makes it so awkward and slow work that I have suspended developing this app for macOS until this is fixed.This is such a major bug (which has been already reported by numerous developers, there is a whole discussion outside about this) that I would think it would get fixed pronto. But this doesn't seem to be happening.Is this just me, am I doing something wrong, is it MacBook Pro specific, or is there a workaround?
Posted Last updated
.
Post not yet marked as solved
0 Replies
158 Views
Hey all, I'm trying to create a Xamarin.Mac app, and am using xcode for it. I've just created the app and tried to click run in xcode, and got the error "Undefined symbol: _main" All I've done is added some icons, a button, and a label. No clue what could be causing this error, so any help is appreciated.
Posted
by Tabogachi.
Last updated
.
Post not yet marked as solved
1 Replies
274 Views
Does anyone know why I get the following error in Interface Builder when I try to refresh a view created in a Swift Package? Build Failed ❌ The built product "Users/*MyName/Library/Developer/Xcode/DeriverData/*PackageBuildDirectory/Build/Intermediates.noIndex/IBDesignables/Products/Debug-iphonesimulator/*PackageName" does not exist in the file system. Make sure your built products contains either an application or a framework product." I can trigger this warning simply by creating a new package, marking a blank UIView as IBDesignable, and bringing it onto a storyboard in the same package. I saw someone suggest that this was happening when they had their project directory on the macOS Desktop which was syncing to iCloud, but my project is on the local HD. I also have a similar issue with Images. I can add an image to my assets catalog, create a UIImageView in Interface Builder, and select it in the image drop-down menu. But when I run the application I get the error: Could not load the "ImageName" image referenced from a nib in the bundle with identifier "com.myCompany.MyApp" It's so strange that Xcode is able to show me the image in Interface Builder, but then fail to retrieve it at runtime. I can load the asset just fine from code. I posted this issue on Stackoverflow here https://stackoverflow.com/questions/72155202/assets-from-swift-package-shows-runtime-warning-could-not-load-image-reference?noredirect=1#comment127492702_72155202 My other option was to build this as a Framework project ("old school") but I've never actually attempted to do this. I'm a bit concerned about binary size since there are numerous image assets. Im also not sure how git work with embedded frameworks. Would be great to have this app as one repository. Any help would be greatly appreciated. :-) Using Xcode 13.2.1
Posted
by mh175.
Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
Hi, I using packages to modularize my app's features, so my package contains Views. I'm unable to get the preview working in from any of my packages. SwiftUI preview is complaining that it couldn't find the dependency module. MessageSendFailure: Message send failure for send previewInstances message to agent ================================== | RemoteHumanReadableError | | LoadingError: failed to load library at path "/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups": Optional(dlopen(/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups, 0x0000): Library not loaded: @rpath/UIConvenience.framework/UIConvenience | Referenced from: /Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups | Reason: tried: '/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/UIConvenience.framework/UIConvenience' (no such file), '/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIConvenience.framework/UIConvenience' (no such file)) I noticed that that the preview starts to work as soon as I remove all the dependencies on a package. It looks like SwiftUI preview is not working for the packages with dependencies. I'm seeing this bug in Xcode 12.5 and in Xcode 13.0 beta 2 ss well. Can some please help me with this bug. At least please confirm if, at all, this feature is implemented in Xcode.
Posted Last updated
.
Post not yet marked as solved
1 Replies
344 Views
I recently migrated to macOS Monterey to build my macOS app. After building the app in 12.3, the users have started to experience mysterious crashes related to view layout. The first one was somehow related to NSScrollView endlessly resizing itself between two width values, and I figured it could have something to do with scroll bar sizing, but found no apparent fix. Crashing on exception: The window has been marked as needing another Display Window pass, but it has already had more Display Window passes than there are views in the window. I circumvented the issue with some duct tape, but ended up with another layout exception on other users' systems: Crashing on exception: The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. It's very hard to debug this, because the bug seems to be very system-specific. However, by intense googling, I've seen that Safari and Xcode have also suffered from the exact same crash, but I've found no information on how they might have been fixed. I'm starting to suspect that there is something principal that has been changed within view layout routines macOS 11/12 that I'm completely missing. Does anyone have any experience with such issues, and how to start digging deeper?
Posted
by tritonus.
Last updated
.
Post not yet marked as solved
2 Replies
688 Views
Why NSMatrix has been removed?The suggestion to use radio-style NSButton is NOT equivalent. With NSMatrix, I could bind `selectedTag` to the corresponding enum property in model with just one binding, mapping radio buttons directly to numerical values of enum options like 2, 3, 5. There is no way to do that with NSButtons without adding tons of boilerplate to the view controller — a getter method, a setter method and key-value observation for EACH button. It also requires binding each radio button separately, which adds maintenance headache. And it requires silly `doNothing:` action, because without some action assigned, they do not work together as a single radio group.Why would you complicate developer's life for no reason?
Posted
by Yello.
Last updated
.