---
title: "modifying layer that is being finalized"
author: "小峰子"
date: "2011-09-28T14:58:19Z"
tags: []
categories: ["移动开发"]
slug: "modifying-layer-that-is-being-finalized"
draft: false
lastmod: "2011-09-28T14:59:30Z"
id: 1182455
url: "https://crazyfeng.iteye.com/blog/1182455"
---

遇到modifying layer that is being finalized这样一个问题。 原因是因为在我的-dealloc方法中 \[button release];导致。 而这个button是这样赋值的： button = \[UIButton buttonWithType:UIButtonTypeCustom]; 将这个\[button release]删除即可