15

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

Changing the title doesn't help enter image description here

Ted
  • 22,696
  • 11
  • 95
  • 109

6 Answers6

15

Try renaming the controller to whatever you want it to be:

Step 1 Select the "controller", named "Delegate" in your screenshot.

enter image description here

Step 2 Click again on "Delegate", or press [Enter] to enter renaming mode.

enter image description here

Step 3 Rename it to something meaningful.

enter image description here

Step 4 Deselect or press [Enter] again to save the changes. The scene name will be updated to match the name you specified.

enter image description here

Steve Wilford
  • 8,894
  • 5
  • 42
  • 66
5

Select View Controller -> Identity Inspector -> Document Label and rename it here.

Identity Inspector - Document Label

This worked for me.

Vinoth Vino
  • 9,166
  • 3
  • 66
  • 70
3

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'.

bunty
  • 629
  • 5
  • 8
2

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>
Helge Becker
  • 3,219
  • 1
  • 20
  • 33
2

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)

Screenshot

Also you can rename the controller manually if you want as suggested by Steve

Nakul
  • 1,452
  • 1
  • 10
  • 6
1

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.

DelegateBug.zip

Ako
  • 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