---
title: "setValue:forUndefinedKey"
author: "简单的茶"
date: "2013-10-15T09:54:48Z"
tags: []
categories: ["移动开发"]
slug: "setvalue-forundefinedkey"
draft: false
lastmod: "2013-10-15T09:54:48Z"
id: 1958219
url: "https://lisai.iteye.com/blog/1958219"
---

使用 Storyboard 创建并管理 UI 时，在运行 app 的时候出现了 2013-10-15 09:21:03.212 TestMSR *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: ': this class is not key value coding-compliant for the key star.'

      检查 storyboard 的 outlet 时也没发现自己连接过 star.....甚是奇怪。

      在此处http://stackoverflow.com/questions/9950938/setvalueforundefinedkey/12302157#12302157
     发现 了答案。
     原来是昨天创建过 star outlet ，后来把它删除了，但是 storyboard 的 source code 并没有更新。

    solutions：  open .storyboard as source code, 删除关于 “star” 的 links，返回 xcode 重新编译。
    问题解决！