Interface Builder

RSS for tag

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

Posts under Interface Builder tag

56 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Xcode 16 issue in Sequoia 15.1
I have macbook pro (Apple M3 Pro), Serial no (xxxxxxxxxxx) with MacOS: sequoia 15.1 Beta (24B5070a). I have installed Xcode 16 also tried on beta. When ever I'm trying to open any of my project and going on storyboard always showing black screen with error (An internal error occured, Editing functionality may be limited). It happens with me last previous week When I updated macOS however same project with same macOs Xcode in another macbook's working fine. before it was was working also fine same project in Xcode 15.4. I hope you get my point I'm waiting for your reply Thanks
0
1
170
1w
Need to remove a button image and use new xcode features
HI, I have an older app that used a button with an image in a storyboard that is also localized. The image was just a red button with rounded corners, white stroke outline, and two lines of white text. (actually two words on top of each other) Now I see that I should be able to create this button with the new xcode button features. I want to try that, by removing the old image and just setting the configuration boxes. I see under the Attributes view, there is the setting with my image fileaname,but no dropdown box to set like "none" or an abiltity to remove it right there at the setting of it. I didn't want to delete the button since it would wipe out the connected code etc. I want to be able to translate the two words to other languages as well. I can't find instructions for this particular task. I guess it's too trivial but I just not figuring it out. I keep deleting the whole button. And now the constraints are all gone so I need to use the new xcode to set it backup. thanks for any guidance with the xcode interface! Chrissie
2
0
731
Sep ’24
Prevent Large Title from Moving Down when Refreshing TableView
I have implemented the Large Title for UITableView correctly. The Navigation bar collapses when scrolling down the table view. However, when pulling to refresh, the Large Title moves down the screen instead of staying stationary. I suspect that this is the default behavior. Is there a way to keep the large title stationary when pulling downward to refresh the UITableView?
0
0
394
Jul ’24
Large Title Navigation Bar Problems with Two Views
As has been posted a number of times, the large title navigation bar only collapses on scrolling for the UIView listed first in an .xib or storyboard file. In my case, I have an enclosing view containing 2 Views, a TableView and a CollectionView in an .XIB file. This is connected to a UIKit class. Tapping a button switches between the two views. If the TableView is the first view listed, the navigationbar collapses with scrolling but with the CollectionView listed second, the large title navigation bar doesn't collapse with scrolling. Alternatively, if the CollectionView is the first view listed, the navigation bar collapses with scrolling but with the TableView listed second, the large title navigation bar doesn't collapse with scrolling. I have not been able to figure out a way to enable the collapsable large title navigation bar to work in such a scenario as mine for both views within a container view. Is there a way to do this? I have tested this capability through iOS 17.
2
0
626
Jul ’24
Binding to Shared User Defaults might fail in Xcode storyboards
While binding to the Shared User Defaults in .xib files is very easy I had hard times to achieve application wide preferences in projects based on storyboards. The behavior is a bit strange/unexpected and even in Xcode 15.4 it seams not to be completely solved. Issue is that IB only creates a single instance of a Shared User Default controller for the first scene, where it was requested and linking to this instance from other scenes offers no functionality. Even worse IB suggests this as first binding proposal. Here an example to deal with this issue. add slider and label to view of ViewController in IB storyboard add MenuItem to windows menu in the Application Scene When running the app this menu item remains disabled as no action is connected bind value of the created menu item to the Shared User Defaults with Model Key Path: “showTerminal“ This creates a Shared User Defaults Controller instance that we use later. Now running the app the menu item is enabled and the checkmark toggles each time add a checkbox to the view add a User Default Controller to the View Controller Scene This must be repeated for any further Window- or View- Controller scene where a binding to the user defaults is required. bind the checkbox to the newly added User Defaults Controller (but not the Shared User Defaults Controller) keeping the suggested Controller key values and set the Model Key Path to “showTerminal“ as above now bind the slider and the label to the same User Defaults controller using an identical Model key If accidentally bound to the Shared User Defaults Controller (this is what IB suggests) no functional binding will take place! Register the defaults early (before the nib is being loaded) to set default values like for example: class AppDelegate: NSObject, NSApplicationDelegate { override init() { super.init() UserDefaults.standard.register(defaults: [ "first": 0.0 , "showTerminal": false ] ) } … } [https://github.com/MissingManual/UserDefaultsBindingsInStoryboard] ATTENTION: Suggestion is, to create the first Defaults Controller as a Shared User Defaults Controller inside the Application scene. Somehow Xcode remembers settings of the Shared User Default Controller and otherwise bindings might fail. MESSAGE: Never bind to the “Shared User Default Controller“ but to individually created “User Default Controller“ for every scene, unless it is the very first time. Alternatively you can set a let variable as @objc let defaults = UserDefaults.standard for example in each ViewController and then bind to this by Bind to: ViewController Controller Key: Model Key Path: defaults.
0
0
363
Jun ’24
IDE generated *varname problem
When Xcode IDE inserts IBOutlet or autocompletes method signatures, it places the * char next to the var name: @property (weak) IBOutlet NSButton *aButton; - (NSString *)someMethod:(NSString *)param1 { } But my convention is put the * char right after the type name: @property (weak) IBOutlet NSButton* aButton; - (NSString*)someMethod:(NSString*)param1 { } Is there anyway to tell Xcode to follow my convention?
0
0
389
Jun ’24
Unable to add fonts to XCode project
Added fonts to MAC and added to Xcode project but fonts are not available in project. Fonts are listed in the Copy Bundle Resources. Fonts are added to Fonts provided by application (Listing dissapears whenever I leave the 'Info' page. Font spelling is correct and double checked. Fonts are listed in project navigator. Fonts do not show up when the lists runs in the console. This same scenario to place when trying to add a different fonst as well. Your help would be appreciated.
0
0
512
May ’24
Debug mysterious window resize?
I am unfortunately faced with a large legacy code base in which Storyboards are heavily used. Now, for some reason, the entire app window is resized if a certain View Controller becomes visible. The issue: Apparently, there aren't any conflicting layout constraints (no LAYOUT_CONSTRAINTS_NOT_SATISFIABLE errors are raised on display of the view controller). There are also no calls to setFrame on the corresponding window. So, how do I debug this? Capturing the view hierarchy didn't provide any helpful insights, and ideally I could just force the window to not resize (due to possible constraint errors). Is there any way to achieve something like this? If not, how can I go about debugging this? Any help on this would be greatly appreciated.
0
0
480
May ’24
Asking about Viewcontroller presenter
I have a ViewController A that need to present in Viewcontroller B. But before the VC A is presented, user pushed to Viewcontroller C and the VC A still show on C. How can it possible? In my point of view, I think the VC B will not show because the VC A is hided. Anyone can help me with this?. Many thanks
0
0
375
May ’24
Hello Devs I would need your help for Time estimate.
The devs really hate this things, but as a project manager I need to know the time estimates. So in development favour I really want to know the time estimate to setup and XCode project, considering project as an average case (includes complexity). So I can really know hpow much time do they actually take or they are just giving over estimates.
1
0
539
Apr ’24
How can I create a .ipa file ??
Hello everyone!! I am writing to inquire about the procedures for testing an application I am developing for iOS devices. The application has been developed using Flutter, and I would like to make it available for testing on my colleague's iPhone, who serves as our QA tester. Currently, my account on the App Store is free, and I would like to ensure proper testing before proceeding with deployment to the Apple Store. As the application is quite large, I am unable to provide it in debug mode on the QA tester's device. Therefore, I would like to enable them to use the application on their personal device for a few days to provide comprehensive feedback on performance and features. Could you please provide guidance on how to proceed with this beta testing process? I am committed to adhering to all of Apple's guidelines and policies to ensure a high-quality user experience. I would be very grateful if anyone could help me out on this, Thank you.
2
0
627
Apr ’24
layoutAttributesForItem(at indexPath:) never gets called on UICollectionViewLayout subclass
Hi! I've got a custom UICollectionViewLayout which has its cells and two supplementary kind of views scattered all over randomly within its bounds. It should be a calendar month view with day of week labels on top, week numbers on the left (supplementary views) and day cells in the middle (items). So far I tracked down that the layoutAttributesForItem(at indexPath:) and layoutAttributesForSupplementaryView(ofKind elementKind:, at indexPath:) are not getting called. Which gives them a reason not to be placed where they should be. layoutAttributesForElements(in rect: ) gets called indeed and the returned value is also OK: override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { super.layoutAttributesForElements(in: rect) var arr = [UICollectionViewLayoutAttributes]() arr.append(contentsOf: AllAttributes.filter({ (Item:UICollectionViewLayoutAttributes) -> Bool in (collectionView!.numberOfSections) > Item.indexPath.section && rect.intersects(Item.frame) })) return arr //47 long array of UICollectionViewLayoutAttributes } In IB the Collection View is specified to be Custom Layout and the respective subclass is specified there. I inspected the official example code here: https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/layouts/customizing_collection_view_layouts The only diffrerence I see is that the example uses UICollectionViewController, which is specified to be Flow Layout in IB, and then the UICollectionView is re-instantiated in code as custom during viewDidLoad. Could that really make a difference? This solution would not be too convenient for me, as I have also other controls on my Controller View. Any help would be appreciated.
0
0
590
Apr ’24
Why unwind method doesn't work now in UIKit?
Hello everyone, I'm facing a problem that I can't connect the button to the unwind segue. I have made a simple application with three controllers. The unwind segue code is located in Table View Controller. @IBAction func unwindToTableViewController(_ unwindSegue: UIStoryboardSegue) { let sourceViewController = unwindSegue.source } A first segue has been implemented from the Add button on Table View Controller to the View controller. It is a Push type. There is a Save button as Bar Button Item in the View Controller. When I try to drag a connection from Save button to the Exit icon of the View Controller, the context menu does not open indicating the unwind segue. Instead, a context menu appears with different types of segues. At the same time, if I just click the Exit icon, a context menu appears where the unwind method is visible. Just in case, I re-read the documentation again and looked at examples of using the unwind method. There is no mention of this problem anywhere. The only hypothesis left is that this problem is related to the new version of Xcode. The example of application given here was created in XCode 15.3. I have tested the same application on another computer, where the version of Xcode is 13.4.1. There, when I try to drag a connection from the Save button to the Exit icon, a context menu appears with the name of the unwind method. But the problem didn't end there because after the connection is established, the button does not work and the View Controller does not dismiss. I can't understand why this is happens. It worked before. Is that one a bug or the feature? How to fix it? Any ideas would be greatly appreciated!
1
0
659
Mar ’24
iOS size classes like Regular, compact, Any
I am new to using iOS Objective-C size classes like Regular, compact, Any. I found that Compact size classes are anything less than ~640 pts and Regular size classes are anything larger than ~640 pts . Is that correct for both iphone and ipad? How can I use size class to make an image full screen on all the iphone and ipad devices and on any orientation? How many images will I need? Any help and insight is greatly appreciated!
0
0
821
Mar ’24
UICollectionView vision becomes small for a few seconds when cell tap
UICollectionView vision becomes small for a few seconds when cell tap See image [Before] [After] In practice, when I press on the cell (tap) it should tag the element, on iOS 17 it works perfectly, on iOS 15.8.1 however it has the ugly effect of shrinking the entire content of the collectionview for a few seconds. Can anybody help me ? I don't know where to look anymore
0
0
506
Mar ’24