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 marked as solved
3 Replies
5.9k Views
Hi,I would like to know if I can use the Apple San Francisco Font for my entire application text:SF Pro ScreenSF Pro TextAnd be able to market the application with this Font.Thanks in advance!
Posted
by maria i..
Last updated
.
Post not yet marked as solved
0 Replies
495 Views
I am trying to add a border around a AVCaptureVideoPreviewLayer, but the left and right sides of the border get clipped after setting the corner radius to anything above 24. The top and bottom border show. I cannot figure out an explanation for this.
Posted
by NO70.
Last updated
.
Post not yet marked as solved
1 Replies
227 Views
I am trying to build a new ios app (Clicker), which is an educational app for universities. I want to build it using SwiftUI NOT Storyboard, and its features are: Login and register with Firebase. Students can put their attendance when they are asked by the instructor. The instructor can make a pop quiz, and he/she can choose the quiz type: Multiple Choice/Polls/Yes or No. The quiz results will be shown on the instructor's account. And other features. So, what should I learn to make a progress with it? If something is not clear, please reply to this question.
Posted Last updated
.
Post not yet marked as solved
1 Replies
300 Views
There are a lot of other questions in the forums like this but they are so old that I thought I should start a new one. I want to add an outlet connection from my file's owner to an NSButton in a .xib. I can't do it. The NSButton is declared as an IBOutlet NSButton *myButton; in my .m file. In my .xib the button's class is declared as NSButton. When I control drag from the NSButton in Interface Builder to the File's Owner's New Referencing Outlet well in the pop-up or the File's Owner in Placeholders nothing happens. There are three other IBOutlets that were in my .m file that are connected. Since I upgraded to XCode 13.3 I can't connect the fourth IBOutlet in my .m file to objects in my .xibs. This has always been easy but now it can't be done in XCode 13.3. I spent a LONG time trying to do this but I can't. The Help documentation doesn't even begin to resemble what I actually see in XCode at all, starting with: "In Interface Builder, open the assistant editor (choose View > Assistant Editor > Show Assistant Editor)". What? There's no such menu item in the View menu. Is this a new super horrible bug in XCode? Should I file a bug report? Does anyone else have this problem?
Posted
by Tlaloc.
Last updated
.
Post marked as solved
8 Replies
916 Views
I'm just learning how to build apps using Swift and Xcode. I'm following along through the Xcode Fundamentals book, and ran into an issue in the "Apple Pie" project. When you tap a button, the button is supposed to reference the button title and set a variable to the button title, but the title instead comes through as "nil" and the app crashes, even though a title is set in interface builder. I created a basic new app to test how I think this code should be working - see screenshots. When the button (title: Aaron) is tapped, the console should print the button title, but instead I'm getting the "nil" value. What am I missing here?
Posted Last updated
.
Post marked as solved
5 Replies
566 Views
I want to have a single window and use buttons to change between VCs A/B/C in that window. (Let's say it's a game and I want to freely move between a map view, a budget view, and a diplomacy view.) No problem on iOS, but on macOS it always wants to open new windows. I want to know the minimum necessary to either: A) Create a window and move between VCs with buttons (i.e., back button, menu button, …) or B) Hook up a split view controller so I can change the VC on the right from buttons on the left. A skeleton project, a tutorial compatible with XCode 12.5, an annotated screenshot, a backmasked Led Zeppelin album… it's been 3 days and I've tried so many things, read so many tutorials, dev docs, that they're all jumbled in my head making it worse. Please save me before I code again!
Posted Last updated
.
Post marked as solved
3 Replies
586 Views
I have a tableView inside a UIView in a VC. This VC is in a navigation view. It is a UIViewController, not a UITableViewController. The VC set up is this one: The issue: When I run app, there is a bar (full width, about 25 pixels high) appearing over the tableView at the bottom, hiding partially a cell (we see the (i) button nearly completely hidden). When scrolling tableView, this bar does not move and hides other cell. I looked at the view in debugger (I edited the content of cells): and found that the bar which is hiding comes from navigation controller: So 2 questions: what is this view ? How to avoid it coming over the table view ? I have a solution by replacing upperView by a header in tableView, but I would like to understand what goes on here.
Posted
by Claude31.
Last updated
.
Post not yet marked as solved
3 Replies
241 Views
There are two places within Xcode (version 13.3) where I can't drag and drop anymore. Trying to move a file to a Group. I have tried just clicking and dragging, control-click, option-click, command-click, none work. Instead of dragging the file, the cursor just moves without the selected/highlighted file and highlights whatever file or group it is hovering over. Trying to drag a button to a View Controller to make a connection or to code to create an outlet. Instead, a popup window appears with three rows, each with corresponding icon, two lines each (title and object type): View Controller, View, Button. (I can't figure out how to capture that screen since I am already holding the control key and mouse button (track pad) but here is a photo. This popup now appears (whether I am holding the control, option, or command key) rather than the blue line:
Posted
by greg182.
Last updated
.
Post not yet marked as solved
2 Replies
341 Views
In Interface Builder, setting the constraints for a UI element (let's say a button) doesn't change if I make the aligment proportional to the Safe Area or proportional to the Superview. I have a button which I set its horizontal alignment to be:  I have another button which I set its horizontal alignment to be:  Both buttons end up being aligned horizontally: I would have expected the button aligned to the Safe Area to be shifted to the right as the Safe Area's leading edge is shifted to the right from the one of the Superview. I'm probably missing something but can't quite understand what is going on here. The problem is that heights and widths proportional to the Safe Area are honored, so the size of UI elements does change if you make them proportional to the Safe Area or to the Superview. So when you try to layout something with Safe Area proportional heights and widths, and also use Safe Area proportional horizontal and vertical placements, UI Elements don't line up for iPhones with a notch. They kind of lineup for devices like iPads and iPhones with no notch where the Safe Area is very close to the Superview area.
Posted
by fermor.
Last updated
.
Post not yet marked as solved
0 Replies
166 Views
Hello Please help me solve the problem My application has been rejected because of my relationship with Iran, but I live in Liverpool, England and run an official charity there. This program is a subset of my charity and my program has nothing to do with Iran and politics. And made for the needy in the UK In addition all information host and server are from the UK. I have already sent all the official documents to the Apple Store to prove this, but again my application was rejected due to a legal problem. Please contact me if anyone can solve my problem. Thank you david golabli developer app tanagers phone: +447308006602
Posted
by TANAGERS.
Last updated
.
Post not yet marked as solved
1 Replies
923 Views
I can not resolve when build Unity IOS in Xcode 13.2.1 with following details: Undefined symbols for architecture arm64:   "_share_init", referenced from:       _ShareManager_share_init_mF5CA286C542839E5E29203AFE3B1EE93BBE97237 in Assembly-CSharp13.o       _ShareManager_Start_m647DBF200476A6B8B113A2F0FE367232E4253777 in Assembly-CSharp13.o      (maybe you meant: _ReversePInvokeWrapper_platformWrap_share_init_m2932BC24F024A606A82A6DC2773E3AAEBDE0DCA4, _platformWrap_share_init_m2932BC24F024A606A82A6DC2773E3AAEBDE0DCA4_RuntimeMethod_var , _platform_common_share_init_m0D4BE0255508B89814C14D0120C2324EE23550DE , _platform_share_init_m1DC874D2391936A9B57EE761A001B9376FA31E0D , _ShareManager_share_init_mF5CA286C542839E5E29203AFE3B1EE93BBE97237 , _platform_commonWrap_share_init_mDE6F15170E340F1C49166F8DD1B91DFA14F494EA_RuntimeMethod_var , _ReversePInvokeWrapper_platform_commonWrap_share_init_mDE6F15170E340F1C49166F8DD1B91DFA14F494EA , _platform_commonWrap_share_init_mDE6F15170E340F1C49166F8DD1B91DFA14F494EA , _platformWrap_share_init_m2932BC24F024A606A82A6DC2773E3AAEBDE0DCA4 )   "_mSetMinTimeBetweenSessions", referenced from:       _AppsFlyer_mSetMinTimeBetweenSessions_m45EEF2D94211029DF81C1D1D14D57B83CA60C5F7 in Assembly-CSharp.o       _AppsFlyer_setMinTimeBetweenSessions_mA4AC89E44E0B64925D33CF563E278843646FC6DF in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mSetMinTimeBetweenSessions_m45EEF2D94211029DF81C1D1D14D57B83CA60C5F7)   "_mTrackCrossPromoteImpression", referenced from:       _AppsFlyer_mTrackCrossPromoteImpression_m1B29F62C51E5595614AFAABA4A2F0CC863853030 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mTrackCrossPromoteImpression_m1B29F62C51E5595614AFAABA4A2F0CC863853030)   "_mHandleOpenUrl", referenced from:       _AppsFlyer_mHandleOpenUrl_mE3349685230AFFA3E9B69E342EAA1D9D7B268B54 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mHandleOpenUrl_mE3349685230AFFA3E9B69E342EAA1D9D7B268B54)   "_mIsStopTracking", referenced from:       _AppsFlyer_mIsStopTracking_m333D85F5852AED46F40292D062807A686B2C2446 in Assembly-CSharp.o       _AppsFlyer_stopTracking_m195D2EFC1FD5D588158DA859790BF46E0940C7CB in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mIsStopTracking_m333D85F5852AED46F40292D062807A686B2C2446)   "_ShareByIos", referenced from:       _ShareManager_ShareByIos_m81BD986A1421420E307C3601615299762556414B in Assembly-CSharp13.o      (maybe you meant: _ShareManager_ShareByIos_m81BD986A1421420E307C3601615299762556414B)   "_mRegisterUninstall", referenced from:       _AppsFlyer_mRegisterUninstall_m8030FA76689BB74634FBB25E8A3EBE43E1F012A9 in Assembly-CSharp.o       _AppsFlyer_registerUninstall_m0CB1BEB905E84BDBACF35A0F7F9735B5546B0105 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mRegisterUninstall_m8030FA76689BB74634FBB25E8A3EBE43E1F012A9)   "_mHandlePushNotification", referenced from:       _AppsFlyer_mHandlePushNotification_m8E9AF2488654CB530380EEEB2E6F6BF8EBCA0D92 in Assembly-CSharp.o       _AppsFlyer_handlePushNotification_mED89605DE75D9F844FC716249FE1D0439ADEAF76 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mHandlePushNotification_m8E9AF2488654CB530380EEEB2E6F6BF8EBCA0D92)   "_mSetShouldCollectDeviceName", referenced from:       _AppsFlyer_mSetShouldCollectDeviceName_mB6371EC508F2B99CCAED32F6A48FAD9078B47FEA in Assembly-CSharp.o       _AppsFlyer_setShouldCollectDeviceName_mD1E265AA78214E85A80DF5984E1BE554E17F1B94 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mSetShouldCollectDeviceName_mB6371EC508F2B99CCAED32F6A48FAD9078B47FEA)   "_mSetCurrencyCode", referenced from:       _AppsFlyer_mSetCurrencyCode_mB0E81847B016B1DCC25FC175FD666AEC17C5C763 in Assembly-CSharp.o       _AppsFlyer_setCurrencyCode_m7A88D43BB44675A18BDC46704CD48215814A30C8 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mSetCurrencyCode_mB0E81847B016B1DCC25FC175FD666AEC17C5C763)   "_mGetConversionData", referenced from:       _AppsFlyer_mGetConversionData_m1CA76D04E5D4B40F16FF938C12DF7C5A17B4CC0C in Assembly-CSharp.o       _AppsFlyer_getConversionData_m88659F6E7EA80CD518A452F36EA4BE08A5C34A62 in Assembly-CSharp.o      (maybe you meant: _AppsFlyer_mGetConversionData_m1CA76D04E5D4B40F16FF938C12DF7C5A17B4CC0C) ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Do you have any suggestion? Thanks!
Posted
by Thang Le.
Last updated
.
Post not yet marked as solved
1 Replies
402 Views
I get this weird behaviour of Xcode. Version 13.2.1 or 13.2 RC (may be other). In the storyboard I had a UITableViewController. As it does not give any flexibility to add other views in the VC, I created a new UIViewController, recreated the tableView inside as well as some other objects, added the new views I needed, redid all connections. Then I removed the UITableViewController. Everything works perfectly fine. But sometimes (cannot find any pattern for the cases), when opening the project, the old UITableViewController appears in Storyboard. The new UIViewController doesn't even seem to be here. When I select different VC in SB, no information in Identity inspector or other inspector. But it compiles and runs OK, using the new UIViewController. I cleaned build folder, closed Xcode, reboot the Mac, to no avail. Only way to get it solved was to close the SB and reopen it… Is there a cache somewhere in SB that is not cleared ?
Posted
by Claude31.
Last updated
.
Post not yet marked as solved
3 Replies
410 Views
I am a complete beginner. I took some code from tutorials. I have a project about adding notes, saving them, deleting them, attaching images and more. When I run the app, I get this error next to @main in the AppDelegate file. Thread 1: "[<App.NewNoteViewController 0x12f310680> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key saveNotes." The view controller file code is import UIKit class NewNoteViewController: UIViewController {     @IBOutlet weak var deleteNote: UIBarButtonItem!     @IBOutlet weak var saveNote: UIBarButtonItem!     @IBOutlet weak var attachNotes: UIBarButtonItem!     override func viewDidLoad() {         super.viewDidLoad()         // Do any additional setup after loading the view.     }        /*     // MARK: - Navigation     // In a storyboard-based application, you will often want to do a little preparation before navigation     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {         // Get the new view controller using segue.destination.         // Pass the selected object to the new view controller.     }     */ } I fixed all the storyboard perfectly. Please help.
Posted Last updated
.
Post not yet marked as solved
2 Replies
326 Views
Hi! I have an @IBDesignable UICollectionView @IBDesignable class CollectionView: UICollectionView { private let cellId = "CollectionViewCell" override func awakeFromNib() { super.awakeFromNib() setup() } override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() setup() } private func setup() { let bundle = Bundle(for: type(of: self)) let nib = UINib(nibName: cellId, bundle: bundle) register(nib, forCellWithReuseIdentifier: cellId) dataSource = self delegate = self } } extension CollectionView: UICollectionViewDataSource { func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 2 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { return dequeueReusableCell(withReuseIdentifier: cellId, for: indexPath) } } I've noticed that when the Collection View number of items in the attribute inspector is less than func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) returns, it leads to Xcode crash on storyboard rendering. For example, this func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 3 } would lead to the crash. The application in the same time works fine in a simulator. I think this is somehow related to dequeueReusableCell(withReuseIdentifier: cellId, for: indexPath) Is there a way to cope the problem?
Posted
by arx37.
Last updated
.