Interface Builder

RSS for tag

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

Posts under Interface Builder tag

200 Posts

Post

Replies

Boosts

Views

Activity

IB_DESIGNABLE and dylib problem
My app has 2 dylibs linked, in build settings run path is set to "@executable_path/../Frameworks" and a copy file rule is also there. The app runs fine for years now (in App Store). But once I turn on IB_DESIGNABLE for a custom view, IB reports errors like below: It seems IB tries to load the dylibs from somewhere in Xcode.app. What should I do in order to get IB_DESIGNABLE to work in IB?
2
0
766
Apr ’23
How to go back to a view controller that wasn't presented without memory leak
I'm trying to back to my initial view controller, but it wasn't presented if the user was already logged in. So, when the user logs out, i want to go back to the initial view controller. i'm currently using a segue, but that would cause a memory leak if used too much. I can't user an unwind segue since the initial view controller was never presented. How would i do this? Thanks.
1
0
484
Apr ’23
Problem with xCode 13.2.1
I have macOS Big Sur 11.7.5 and I had to download the version of xCode 13.2.1, which is compatible according to the Apple page. When I open xCode and choose "Open a project or file" it says "Could not open file." and the file path of your choice. I do not know what else to do! If I press the right button and open the simulator it lets me open it but when I try to build my React-Native app the xCode doesn't detect me Thanks for your help!! error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ristoUserApp.xcworkspace.
1
0
1.4k
Apr ’23
Primitive figures in Xcode Storyboard
I want to create a clickable primitive (such as a circle or square) in my UI, but I couldn't find any other way than just simply putting an 'o' in the text of the button. I know that this is a really bad idea, but I'm new to Xcode and I know almost nothing about it. I would be really thankful if anyone could explain to me how to do it in a correct way. Thank you in advance!
2
0
755
Apr ’23
Xcode Auto Layout Constraints for Button Sizes on Different Devices
The issue being faced in Xcode is related to constraints and button sizes. The problem is that there are two image buttons on the same horizontal axis, which are of the same size on an iPhone. However, when the app is run on an iPad, one button appears bigger than the other in terms of width. The buttons are located in a vertical stack view. Any suggestions to solve the issue would be appreciated and if anyone needs additional information let me know(I'm also on the latest version of Xcode).
3
0
1k
Apr ’23
Navigation Bar disappearing when using RootViewController
I am trying to see if the user is logged in using the userdefaults, and if he is, to display the main view controller. This is the scene delegate code. var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { if UserDefaults.standard.bool(forKey: "isLoggedIn") && false { let homeViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "MainStoryBoard") as! MainViewController let navigationController = UINavigationController(rootViewController: homeViewController) window?.rootViewController = navigationController } else { let homeViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "InitialViewController") as! InitialViewController let navigationController = UINavigationController(rootViewController: homeViewController) window?.rootViewController = navigationController } window?.makeKeyAndVisible() } This is what it's supposed to look like: However, this is what it looks like : We can see the navigation bar is totally gone. This is how my views look like. I have a tab view controller linked to a navigation view controller linked to the main view controller I would like to present. Thanks!
2
2
1k
Apr ’23
Navigation Bar dissapearing when using rootViewController
I am trying to see if the user is already logged in, and if he is, to bring him to a navigation controller, which contains the mainViewController. This is in my scene delegate if UserDefaults.standard.bool(forKey: "isLoggedIn") { let homeViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "MainStoryBoard") as! MainViewController let navigationController = UINavigationController(rootViewController: homeViewController) window.rootViewController = navigationController } This is what it's supposed to look like But, instead, it removes the navigation bar.
0
1
531
Apr ’23
XCODE and IOS coding question
Hi there, I am an app developer, who had excellent coders, but COVID through my family and me into a "LOOP". I want to learn the Build interfaces for applications without writing code using Interface Builder, an editor within Xcode. I am bootstrapped and want to be a programmer again for two reasons. I have three apps that need to be updated for the iPad iTunes Store. I want to learn Xcode and IOS for two reasons: One, two sell my apps again, which are great, to help sustain my nearby retirement years, and Two, to prevent dementia or Alzheimer's. You see, Mom is in her 80s, and it's been tough for us 1980 college graduates to see her go through this. I want to prevent it for me by learning to code again and be able to take care of her with a stay-home job of tutoring and programming, sorry coding—Google MontessoriTech for the iPads. I need a website, too, because WIX took my site down during COVID. Send me good advice. Kindness goes a long way, and I'll send you advice on how you can take care of your parents now or when you are my age. Love, Mrs. Grace Kochanik
1
0
703
Apr ’23
UIButton(configuration:... Does not work
I'm trying to use the new uibutton configuration and it doesn't receive touches. What am I missing? Adding other buttons the "old fashioned" way work just fine. var configuration = UIButton.Configuration.filled() configuration.buttonSize = .large configuration.title = "Swift" configuration.image = UIImage(systemName: "swift") configuration.imagePlacement = .trailing configuration.titlePadding = 10 configuration.imagePadding = 10 configuration.contentInsets = NSDirectionalEdgeInsets(top: 10, leading: 10, bottom: 10, trailing: 10) let tempButton = UIButton(configuration: configuration) tempButton.addAction(UIAction(handler: { action in print("new touched") }), for: .touchUpInside) self.view.addSubview(tempButton)
2
0
2.6k
Apr ’23
Xcode 12 missing "value" bindings? (ObjC, nibs, Cocoa)
Is there a known issue with the value binding being missing from NSButton in Xcode 12? Here's the Bindings Inspector shown an a fresh NSButton (top image), and shown on an existing button that probably goes back to Xcode 9 or so: (Hmmm, I can't link to imgur, but you might see an example at their domain plus this top-level path: /a/tElLv9I) What's worse, when I modify the existing button in most ways, the binding to value breaks completely. NSButton 0x7fb233f965d0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key value. Even more worse, if I delete the binding, close the nib, and re-open it, then there's no way to re-add the value binding to a button that had been already working. The Cocoa Bindings Documentation - https://developer.apple.com/library/archive/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSButton.html#//apple_ref/doc/uid/NSButton-SW1 indicates that the value binding isn't deprecated and should still be supported. Did I miss a fundamental breaking change somewhere?
3
0
1.3k
Apr ’23
layer.cornerRadius works in viewDidAppear but not in viewDidLoad
We have classes BaseTextField and BaseButton. txt1 and btn1 are objects of the above classes respectively. This below code works in viewDidAppear, but not in viewDidLoad. txt1.layer.cornerRadius = 8.0 btn1.layer.cornerRadius = 8.0 btn1.titleLabel?.font = .boldSystemFont(ofSize: 17.0) In viewWillLayoutSubviews, only the button changes the layer but not the textfield. Can someone throw some light?
0
0
593
Apr ’23
"Command LinkStoryboards failed with a nonzero exit code" Error
Hello! I need help with a "Command LinkStoryboards failed with a nonzero exit code" error. I have tried almost everything imaginable: I have deleted the storyboard causing the issue, created a new storyboard with a new name, create a new app, redownloaded Xcode, etc. Basically, anytime I try to create a segue to a storyboard reference I get this error. I don't know what's causing it and I could really use some assistance.
2
0
1.5k
Apr ’23
In iOS 15.0 to 15.5 moreNavigationController is not displaying image
This is only applicable for unsolvable bug in iOS 15.0 to 15.5. However, in iOS 16.0 and onwards its working fine. let image = UIImage.init(named: "bug")?.withRenderingMode(.alwaysOriginal) self.tabBarItem = UITabBarItem(title: "I am Bug", image: image, selectedImage: image) If you see moreNavigationController then instead of showing image with "I am Bug" title it's showing dark gray color. I am unable to identify why this dark gray color is showing on moreNavigationController.
0
0
449
Mar ’23
XCode. Inspector Tab: Open Class file button does not work
Started from the XCode 14 Beta, this button (gray with arrow, what should open file with assigned Class on the Inspector Tab) just highlighting when I tap on it, but It doesn't cause any reaction. It is actual for now (Version 14.2 (14C18)). I created ticket with this bug on the Feedback Assistant on September, but it still didn't elicit any response. In Xcode 13 this button works correctly. Is there any way to fix this issue on my side?
0
1
552
Mar ’23
safe area includes notch?
I'm creating a launch screen by storyboard for a swiftui app. When I rotate the iPhone 14 to landscape, the safe area has insets on vertical, without any inset on horizontal(shown as the image below). IMO, the safe area should have inset on leading, trailing and bottom edge in this case. Do I miss anything?
2
0
1.6k
Mar ’23
IB_DESIGNABLE and dylib problem
My app has 2 dylibs linked, in build settings run path is set to "@executable_path/../Frameworks" and a copy file rule is also there. The app runs fine for years now (in App Store). But once I turn on IB_DESIGNABLE for a custom view, IB reports errors like below: It seems IB tries to load the dylibs from somewhere in Xcode.app. What should I do in order to get IB_DESIGNABLE to work in IB?
Replies
2
Boosts
0
Views
766
Activity
Apr ’23
How to go back to a view controller that wasn't presented without memory leak
I'm trying to back to my initial view controller, but it wasn't presented if the user was already logged in. So, when the user logs out, i want to go back to the initial view controller. i'm currently using a segue, but that would cause a memory leak if used too much. I can't user an unwind segue since the initial view controller was never presented. How would i do this? Thanks.
Replies
1
Boosts
0
Views
484
Activity
Apr ’23
Setting the Mac Desktop Wallpaper using Microsoft Intune
I am trying to set company managed MacOS machines background using Microsoft Intune. I currently have a script that pulls from the Internet that changes backgrounds using pictures coming from Bing. Is there a way to change from a picture on the mac itself or would I have to use an Internet image holding system
Replies
0
Boosts
0
Views
952
Activity
Apr ’23
Problem with xCode 13.2.1
I have macOS Big Sur 11.7.5 and I had to download the version of xCode 13.2.1, which is compatible according to the Apple page. When I open xCode and choose "Open a project or file" it says "Could not open file." and the file path of your choice. I do not know what else to do! If I press the right button and open the simulator it lets me open it but when I try to build my React-Native app the xCode doesn't detect me Thanks for your help!! error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ristoUserApp.xcworkspace.
Replies
1
Boosts
0
Views
1.4k
Activity
Apr ’23
Primitive figures in Xcode Storyboard
I want to create a clickable primitive (such as a circle or square) in my UI, but I couldn't find any other way than just simply putting an 'o' in the text of the button. I know that this is a really bad idea, but I'm new to Xcode and I know almost nothing about it. I would be really thankful if anyone could explain to me how to do it in a correct way. Thank you in advance!
Replies
2
Boosts
0
Views
755
Activity
Apr ’23
No way to switch CoreData Editor to display ER diagram!
Could you enable in Xcode 14 Betas the ability to switch to the useful ER diagram for project CoreData models please...
Replies
3
Boosts
1
Views
1.9k
Activity
Apr ’23
Xcode Auto Layout Constraints for Button Sizes on Different Devices
The issue being faced in Xcode is related to constraints and button sizes. The problem is that there are two image buttons on the same horizontal axis, which are of the same size on an iPhone. However, when the app is run on an iPad, one button appears bigger than the other in terms of width. The buttons are located in a vertical stack view. Any suggestions to solve the issue would be appreciated and if anyone needs additional information let me know(I'm also on the latest version of Xcode).
Replies
3
Boosts
0
Views
1k
Activity
Apr ’23
Navigation Bar disappearing when using RootViewController
I am trying to see if the user is logged in using the userdefaults, and if he is, to display the main view controller. This is the scene delegate code. var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { if UserDefaults.standard.bool(forKey: "isLoggedIn") && false { let homeViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "MainStoryBoard") as! MainViewController let navigationController = UINavigationController(rootViewController: homeViewController) window?.rootViewController = navigationController } else { let homeViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "InitialViewController") as! InitialViewController let navigationController = UINavigationController(rootViewController: homeViewController) window?.rootViewController = navigationController } window?.makeKeyAndVisible() } This is what it's supposed to look like: However, this is what it looks like : We can see the navigation bar is totally gone. This is how my views look like. I have a tab view controller linked to a navigation view controller linked to the main view controller I would like to present. Thanks!
Replies
2
Boosts
2
Views
1k
Activity
Apr ’23
Navigation Bar dissapearing when using rootViewController
I am trying to see if the user is already logged in, and if he is, to bring him to a navigation controller, which contains the mainViewController. This is in my scene delegate if UserDefaults.standard.bool(forKey: "isLoggedIn") { let homeViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "MainStoryBoard") as! MainViewController let navigationController = UINavigationController(rootViewController: homeViewController) window.rootViewController = navigationController } This is what it's supposed to look like But, instead, it removes the navigation bar.
Replies
0
Boosts
1
Views
531
Activity
Apr ’23
XCODE and IOS coding question
Hi there, I am an app developer, who had excellent coders, but COVID through my family and me into a "LOOP". I want to learn the Build interfaces for applications without writing code using Interface Builder, an editor within Xcode. I am bootstrapped and want to be a programmer again for two reasons. I have three apps that need to be updated for the iPad iTunes Store. I want to learn Xcode and IOS for two reasons: One, two sell my apps again, which are great, to help sustain my nearby retirement years, and Two, to prevent dementia or Alzheimer's. You see, Mom is in her 80s, and it's been tough for us 1980 college graduates to see her go through this. I want to prevent it for me by learning to code again and be able to take care of her with a stay-home job of tutoring and programming, sorry coding—Google MontessoriTech for the iPads. I need a website, too, because WIX took my site down during COVID. Send me good advice. Kindness goes a long way, and I'll send you advice on how you can take care of your parents now or when you are my age. Love, Mrs. Grace Kochanik
Replies
1
Boosts
0
Views
703
Activity
Apr ’23
UIButton(configuration:... Does not work
I'm trying to use the new uibutton configuration and it doesn't receive touches. What am I missing? Adding other buttons the "old fashioned" way work just fine. var configuration = UIButton.Configuration.filled() configuration.buttonSize = .large configuration.title = "Swift" configuration.image = UIImage(systemName: "swift") configuration.imagePlacement = .trailing configuration.titlePadding = 10 configuration.imagePadding = 10 configuration.contentInsets = NSDirectionalEdgeInsets(top: 10, leading: 10, bottom: 10, trailing: 10) let tempButton = UIButton(configuration: configuration) tempButton.addAction(UIAction(handler: { action in print("new touched") }), for: .touchUpInside) self.view.addSubview(tempButton)
Replies
2
Boosts
0
Views
2.6k
Activity
Apr ’23
NSStackView.distribution runtime question
I target my project to macOS version 10.10. Now I have an NSStackView in IB and I can set its distribution property in the inspector pane. But there is a yellow warning saying that the distribution property is available only on 10.11+. My question is - will my app crash if it runs on macOS 10.10?
Replies
2
Boosts
0
Views
646
Activity
Apr ’23
Xcode 12 missing "value" bindings? (ObjC, nibs, Cocoa)
Is there a known issue with the value binding being missing from NSButton in Xcode 12? Here's the Bindings Inspector shown an a fresh NSButton (top image), and shown on an existing button that probably goes back to Xcode 9 or so: (Hmmm, I can't link to imgur, but you might see an example at their domain plus this top-level path: /a/tElLv9I) What's worse, when I modify the existing button in most ways, the binding to value breaks completely. NSButton 0x7fb233f965d0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key value. Even more worse, if I delete the binding, close the nib, and re-open it, then there's no way to re-add the value binding to a button that had been already working. The Cocoa Bindings Documentation - https://developer.apple.com/library/archive/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSButton.html#//apple_ref/doc/uid/NSButton-SW1 indicates that the value binding isn't deprecated and should still be supported. Did I miss a fundamental breaking change somewhere?
Replies
3
Boosts
0
Views
1.3k
Activity
Apr ’23
layer.cornerRadius works in viewDidAppear but not in viewDidLoad
We have classes BaseTextField and BaseButton. txt1 and btn1 are objects of the above classes respectively. This below code works in viewDidAppear, but not in viewDidLoad. txt1.layer.cornerRadius = 8.0 btn1.layer.cornerRadius = 8.0 btn1.titleLabel?.font = .boldSystemFont(ofSize: 17.0) In viewWillLayoutSubviews, only the button changes the layer but not the textfield. Can someone throw some light?
Replies
0
Boosts
0
Views
593
Activity
Apr ’23
"Command LinkStoryboards failed with a nonzero exit code" Error
Hello! I need help with a "Command LinkStoryboards failed with a nonzero exit code" error. I have tried almost everything imaginable: I have deleted the storyboard causing the issue, created a new storyboard with a new name, create a new app, redownloaded Xcode, etc. Basically, anytime I try to create a segue to a storyboard reference I get this error. I don't know what's causing it and I could really use some assistance.
Replies
2
Boosts
0
Views
1.5k
Activity
Apr ’23
In iOS 15.0 to 15.5 moreNavigationController is not displaying image
This is only applicable for unsolvable bug in iOS 15.0 to 15.5. However, in iOS 16.0 and onwards its working fine. let image = UIImage.init(named: "bug")?.withRenderingMode(.alwaysOriginal) self.tabBarItem = UITabBarItem(title: "I am Bug", image: image, selectedImage: image) If you see moreNavigationController then instead of showing image with "I am Bug" title it's showing dark gray color. I am unable to identify why this dark gray color is showing on moreNavigationController.
Replies
0
Boosts
0
Views
449
Activity
Mar ’23
XCode. Inspector Tab: Open Class file button does not work
Started from the XCode 14 Beta, this button (gray with arrow, what should open file with assigned Class on the Inspector Tab) just highlighting when I tap on it, but It doesn't cause any reaction. It is actual for now (Version 14.2 (14C18)). I created ticket with this bug on the Feedback Assistant on September, but it still didn't elicit any response. In Xcode 13 this button works correctly. Is there any way to fix this issue on my side?
Replies
0
Boosts
1
Views
552
Activity
Mar ’23
safe area includes notch?
I'm creating a launch screen by storyboard for a swiftui app. When I rotate the iPhone 14 to landscape, the safe area has insets on vertical, without any inset on horizontal(shown as the image below). IMO, the safe area should have inset on leading, trailing and bottom edge in this case. Do I miss anything?
Replies
2
Boosts
0
Views
1.6k
Activity
Mar ’23
Seeking Apple.com’s UI Guidelines
Hi again I’m looking for the design guidelines for Apple.com, but I cannot find anything except this for developers: Human Interface Guidelines - Human Interface Guidelines - Design - Apple Developer. This mainly concerns interfaces and best practices for iOS and macOS applications, but are there any resources on the design of Apple’s website. Thank you.
Replies
1
Boosts
0
Views
563
Activity
Mar ’23
ToolTips are not working xcode 13.3
I've been trying to integrate Tooltips in my project on buttons and views but for some reason tooltips aren’t responding. is this a bug? do i need to upgrade my xcode version?
Replies
0
Boosts
0
Views
438
Activity
Mar ’23