简体   繁体   中英

Xcode 10 Storyboard extremely slow to the point of unresponsive

my Xcode 8.3.3 storyboard is extremely slow almost unresponsive and I don't know what is causing it.

Tried:

Deleting xcuserdata and opening Xcode again.

Opening Xcode on a different project. (It worked fine. It just seems to be this one main.storyboard in this specific project.)

Extracting the main.storyboard file and opening and closing Xcode then putting it back in.

Restarting my Mac (Late 2016. Refurbished with touch-bar. 16GB memory 512GB storage.)

Cleaning the project. (CMD+Shift+K)

All of these have failed and I'm trying to launch my app next week. If this persists, I won't be able to launch and will get behind my schedule.

When I deleted the xcuserdata, I was able to navigate to another .swift file and it works fine. But when I go into storyboard it slows down to basically 1FPS. (I have a MacBook Pro with 16GB of RAM I don't know why it isn't handling this better.)

I'm really fed up with this and all the other things I have tried didn't work.

I found the anwser to my own question for anyone who is having this issue.

  1. clear your xcuserdata and xcworkspace from your Xcode project by clicking show package contents on your xcodeproj file. Move xcuserdata and xcworkspace to the trash.

  2. This allows you to open up your Xcode project again and be able to open storyboard as source code. It resets the last file you had open. To do this right-click (or two-finger click on track-pad) on main.storyboard and choose Open as Source Code

  3. At the top you'll see some code similar or identical to this

<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="OjV-iF-7f7">
<device id="retina5_5" orientation="portrait">
    <adaptation id="fullscreen"/>
</device>
<dependencies>
    <deployment identifier="iOS"/>
    <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
/* delete this here */
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
    <array key="small_pixel.ttf">
        <string>Small-Pixel</string>
    </array>
</customFonts>
<scenes>

Don't panic, you are only looking for one line. No editing needs to be done.

<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/"  
  1. Once you've found it, delete the entire line from the code.

You should now be able to open up the main.storyboard file as the normal interface builder by right-clicking (two-finger click on track-pad) and choosing Open as Interface Builder

(01/07/2020) Reports state this still works for the latest version of Xcode.

I had extremely slow only when editing on xib file in Xcode version 10.1. What worked for me was to disable the Source Control under Xcode/Preferences/Source Control and then I checked "Enable Source Control" again and it fixed it.

我在 xcode 10.1 上遇到了同样的问题,然后我将项目格式从Xcode 8.0 - 兼容Xcode 9.3 - 兼容,并且一切正常。

If your computer has a dual Graphics card, you can install a GFXCardStatus or otherwise switch to an integrated video card. After this manipulation, the storyboard worked very well for me. Good luck!

https://github.com/steveschow/gfxCardStatus/releases/tag/v2.4.4i

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM