After updating Xcode 7, some of my viewcontrollers' names changed to Delegate Scene, what to do about this? Thanks!

- 22,696
- 11
- 95
- 109
-
Given the fact that no one did reply I assume that this is a rather uncommon problem - if not unique. Is there any chance you could provide the storyboard for examination? – Helge Becker Oct 05 '15 at 09:52
-
1@HelgeBecker Well it seems like at least 5 people have this problem within a few weeks, so there might be something to it. I am afraid I am not allowed to share our storyboard. – Morten Holmgaard Oct 05 '15 at 12:13
-
@ Ted: Roger, it is not an isolated issue. Sorry to hear. Where you able to reproduce the issue in a new project that doesn't contain critical data? – Helge Becker Oct 05 '15 at 14:04
-
I presume you've tried renaming it. – Steve Wilford Oct 08 '15 at 06:51
-
@SteveWilford No - because I do not know which property to use, that is not shown in the app UI? – Morten Holmgaard Oct 08 '15 at 07:02
-
Same here, looks like Xcode 7 regression. – Nikolay Kasyanov Oct 12 '15 at 14:22
6 Answers
Try renaming the controller to whatever you want it to be:
Step 1 Select the "controller", named "Delegate" in your screenshot.
Step 2 Click again on "Delegate", or press [Enter] to enter renaming mode.
Step 3 Rename it to something meaningful.
Step 4 Deselect or press [Enter] again to save the changes. The scene name will be updated to match the name you specified.

- 8,894
- 5
- 42
- 66
-
1Thanks - I don't know why I haven't thought about that. But I would still like to figure out what the problem is in the storyboard file provided. – Morten Holmgaard Oct 09 '15 at 09:59
-
3It does not always work - the name is changed back just after renaming it! – Morten Holmgaard Oct 14 '15 at 12:21
-
6The rename maps to Document: Label in Identity Inspector - rename it there, it will always work. – Morten Holmgaard Oct 16 '15 at 08:26
Select View Controller
-> Identity Inspector
-> Document Label
and rename it here.
This worked for me.

- 9,166
- 3
- 66
- 70
Adding to @Steve Wilford Reply:
In Xcode 7's story board, there is limitation on length of name of view controller to be shown in left pane which is 15 characters. All the names having greater than 15 characters, will be changed to strange name say 'Delegate Scene' or 'Data Source Scene'.

- 629
- 5
- 8
I dont have a direct answer, but a place to look. Unfortunately it exceed the space for comment, so I have to put it here. Sorry.
If you select the storyboard in the project explorer, you can open its sourcecode. Storyboards are just XML files. How does the viewcontroller look like? Compare it to a reference,eg a freshly created one. Perhaps you can share the xml part of the viewcontroller? Example with one (out of the box) view controller:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="eee" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

- 3,219
- 1
- 20
- 33
Check the title property of your View Controller, the name of the view controller comes from either the title property or the Class.(Title taking precedence)
Also you can rename the controller manually if you want as suggested by Steve

- 1,452
- 1
- 10
- 6
Here is a project where you can clearly see that this is a Interface Builder bug. I have reported it but no responce. Id is 22972580.

- 956
- 1
- 10
- 13
-
The bug still exists. I implemented a carousel. When I set the data source and delegate of my UIVIew to the view controller ('yellow circle'), it changed name of scene to 'Data Source'. Have tried to rename scene, title, storyboard ID, etc... nothing helps. I even tried to change it at source code of the story board. – Katherine Jenkins May 01 '16 at 04:15
-
Actually, @bunty has it correct in his answer below. While I had a long scene name originally (that displayed fine as the scene name), adding my UIVIew's delegate and data sources to the ViewController changed the name to Data Source for every relevant scene. But, shortening the name now seems to do the trick. – Katherine Jenkins May 01 '16 at 04:24