How to assign dynamic text styles in Xcode 11? - interface-builder

Edit: Probable Bug. Seeking fix or workaround…
How can I get the system’s text styles to be available in the interface builder when using Xcode 11?
I just started using Xcode 11 this week. In the interface builder (storyboard mode), when I go to assign a dynamic type text style to a Label or Button, using the Font -> Style pop-up, all the text styles are missing from the popup menu.
I do have the Dynamic Type “Automatically Adjusts Font” checkbox checked, as well.
I’m not sure if this is a bug, an intentional change I can’t find documentation for, or something else.
The expected behaviour is described in Apple’s developer documentation “Scaling Fonts Automatically”. Specifically, in the “Configuring Text Styles Using Interface Builder” section.
Further exploration: I’ve tried it with new projects, old projects (from Xcode 10), projects targeting iOS 12.2 and 13.1. All had the same problem of no text styles in the popup menu.

I experience the same problem when upgrading from Xcode 11.0 to Xcode 11.1 or 11.2 beta 2:
Xcode 11.0:
Xcode 11.1:
I also filed a bug report (FB7415999) with Apple and also opened an issue with them.
**My curren solution at the moment is a downgrade to Xcode 11.0 for UI development and a parallel install of Xcode 11.2 beta for on device runs **

This is probably a bug in Xcode 11.1. I ran into the same thing and filed a bug with Apple (FB7368959). A colleague running Xcode 11.1 on Catalina did not have the same problem, nor did another running Xcode 11.1 on Mojave.
Here is a workaround that got me back on track: I opened the problematic project in both Xcode 10.3 and 11.2 beta. In both, the dynamic type styles were available in IB. I didn't change anything, but reverted to Xcode 11.1, and now the styles are there, too. Hopefully this works for Grant and anyone else that runs into this annoyance.
Edit Mar. 17, 2020: This problem has reoccurred for me on Xcode 11.3.1. It seemed to happen with a specific project, and the problem spread to a second machine as soon as I opened that project. My workaround didn't help when I opened the project in 11.4 beta 3.

Related

Cannot paste text on mac into ios simulator Xcode 12?

I am using Xcode 12.5, and I am trying to paste some text from a file into my ios Simulator (iPhone 11 ios 14.5). This does not work. Any thoughts or ideas on how to fix this?
I have looked at a number of other posts but they all seem outdated and don't work for me.
Also I am using an Apple M1 Mac mini ...if that makes a difference. I am also building my application with Xamarin.
The steps I took:
I turn of Automatically Sync Pasteboard
Copy the text (which is just letters from a .txt file)
Click send pasteboard from the edit menu.
Click on my Editor control and select paste
The outcome is that it shows the bubble at the top saying myappName pasted from CoreSimulatorBridge. However, it doesn't actually paste the text.
I answered this elsewhere, but it took so long to find I am repasting a couple places I looked first. Essentially, with Apple M1 Silicon, iOS 14+ pasting doesn't work. Switching to a simulator running 13.7 or earlier fixed it.
it seems it was an issue that Apple fixed in the latest XCode updates, copy/paste works with me on a simulator with IOS 16.2 and XCode 14.2
Now with XCode 14 I'm not being able to build 13.7 or earlier.

Xcode 10 storyboard UI components are not visible and painfully slow?

My code was working fine (showing UI properly) when I had Xcode 9 and I removed it from the application folder (could not update as it had installed using another apple id) and reinstall the Xcode 10 from the Appstore.
Now Xcode storyboard not showing any added UI elements colors or anything and I removed Xcode 10 and installed Xcode 9 again but problem remains same.
UI screen shot of storyboard.
I tried removing Xcode in this way:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
Then I tried installing macOs Mojave and install XCode 10 again from the Appstore. Issue still remains. I tried cleaning derived data, xuserdata and everything.
Try cleaning your project using "Command + K"
and run your project again!
Hope it works!
I encountered the same issue that you are facing in my case i had xCode 10.0 installed and everything was working fine. As soon as I installed version 10.1 I faced the same issue that you're facing but the good thing was i had xCode 10.0 installed at the same time so I switched back and everything was working fine.
From my point of view my system(Mac-mini mid 2011) was lacking hardware specification that was required for xCode 10.1 also had very low graphic processor in my mac mini. If you install the same version in a MacBook or any other system having higher specification you'll face the issue. I hope that helps.
I was stuck on this all day. One of my coworkers suggested removing occurrences of IB_DESIGNABLE & #IBDesignable. This fixed the issue for me. It still lags sometimes but doesn’t go invisible anymore.
If you have multiple xib files then just try to switch between or Try moving to launchScreen storyboard and then switch to main storyboard. I think this is just loading issue.
Reinstall Xcode. That worked for me.
Click on library button(Circular Button) which is left to hamburger sign(Top Bar Right Side). Elements will be popup on your screen then you can choose elements.
try
xcrun simctl erase all
it helped me with the same problem

Xcode storyboard showing osX object library. I want IOS object library

I develop mainly IOS apps but, recently, I worked on an OSX app. Both are possible with Xcode (I use 8, with swift).
Unfortunately, when I switched back to my already-existing IOS project (after restarting Xcode), the storyboard selection menu for the object library shows only OSX objects, not IOS (e.g. UIImageView).
I have googled without success and tried restarting Xcode, also without success. Can anyone help me fix this?
I did a lot more searching and came up with:
Xcode is loading in OS X objects instead of iOS objects
There there are other solutions proposed but the one that worked for me was to close the assistant editor and then, in the file list ( leftmost window in Xcode 8), I double clicked on the storyboard file. Problem solved. I am surprised that this bug still exists in this latest version...it is very troublesome.

How to enable Visual Memory Debugger in Xcode 8?

I migrated a project from the previous version of Xcode to Xcode 8. What I want is to use the new visual memory debugger. It's available in new projects, but is entirely missing in my imported one. Why is this?
It appears that Swift 3 is required for Visual Memory Debugger to work.
My app migrated to Swift 2.3 did not work, when I tried migrating it to Swift 3.0 it worked instantly.
The runtime sanitization checkbox is not required for visual memory debugger to work, however the reason that it is disabled is the same.
It seems like the project requires Swift 3 to enable Adress & Thread Sanitizer (which is the Memory Debugger).
For me this applies to both iOS & OS X/macOS apps. Both written in Swift 2.2 & converted to 2.3.
Note: I only tested this on OS X El Capitan 10.11.5.
#gabriellanata confirms that it works when the code is converted to Swift 3.
I just ran an Objective-C iOS 7 project made with Xcode 7 in Xcode 8 (without migrating) and the Visual Memory Debugger icon appears at the bottom of Xcode in the debugging area next to the Debug View Hierarchy button.
It's the button with the three circles.
From the other comments, it looks like Swift 3 might be required to use this feature.
Argument '-sanitize=address' is not supported on the Swift 2.3 toolchain.
You will need to migrate your project to Swift 3 to use this feature.
Xcode 8 GM build error
P.S. Objective-c supported by Visual Memory Debugger
If you click on Memory, the source editor pane will change to show some memory information, including why it's disabled. In my case, it was because I had Zombie Objects enabled in the Scheme. (Xcode 8.3.2)

Interface Builder appears blurry on retina display in Xcode 6.3

I just recently downloaded the latest public release of Xcode (6.3) and I noticed the storyboard for my app is now low res on my Retina MacBook Pro. Images, text and standard UI elements all appear blurry. On the actual device everything looks fine and code still looks sharp its just while working in the Interface Builder.
Has anybody else noticed this and figured out a way to fix it? This is happening to me in both Swift and Objective-C projects including in Apple's sample projects (Master-Detail Application and etc).
I submitted this as a bug report, and Apple responded by saying that it is the desired appearance. They did not give an explanation, that was all they said.
It appears to be related to a bug in the newest iOS SDK, and as a workaround, they've forced Interface Builder to render everything at 1x. Currently, there doesn't seem to be any solution to this annoying problem other than to wait.
Just installed Xcode version 6.3.2 and this issue appears to have been fixed.
Have you tried re-installation of the same version? That helped once.
Alternatively, can upgrade to newer version, too.

Resources